Posts

Showing posts from February, 2018

The future of React / ReactJS - React Fiber

Image
Facebook is one of the world’s most powerful company and has created a framework called React.js for building web apps. React.js respectively appear to be in a battle for the future of the web, with the active online debate and adoption of large consumer-facing apps seeming to lean quite strongly in React.js’s favor at present. React.js is getting so much popularity that it is unlikely to be replaced in the near future. React also embraces unidirectional data flows through Flux architecture. Stacks like Firebase are getting popular, thanks to React community. Today, there are many updates that have been in the pipeline for the last few months are finally released. Among the updates are some long-standing feature requests, including fragments, error boundaries, portals, support for custom DOM attributes, improved server-side rendering, and reduced file size. There are few updates in  React v16.0.0  as listed below. Better error handling Previously, run-time err...

Using Reselect Selectors for Encapsulation and Performance with Redux

Image
An overview of why and how to use Reselect with React and Redux In a good Redux architecture, you are encouraged to keep your store state minimal, and derive data from the state as needed. As part of that process, we recommend that you use “selector functions” in your application, and use the Reselect library to help create those selectors. Here’s a depth detail of correct use of Reselect. Basics of Selectors A “selector function” is simply any function that accepts the Redux store state (or part of the state) as an argument, and returns data that is based on that state. Selectors don’t have to be written using a special library, and it doesn’t matter whether you write them as arrow functions or the  function  keyword. For example, these are all selectors: const selectEntities = state = > state . entities ; function selectItemIds ( state ) { return state . items . map ( item = > item . id ) ; } const selectSomeSpecificField = state = > s...

10 React component libraries you should know in 2018

Image
The popularity of React seems to be ever growing. React is leading in popularity in Stack overflow’s 2017 most loved component libraries. React’s virtual DOM, the ability to declaratively describe a user interface and model the state of that interface, low barriers to entry for a decent JavaScript developer, all make React a great go-to library for building UI’s. Another great reason for working with React is components. Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. To help kickstart your work with React components, here are 10 great React component libraries you should consider for your next app. Many of these libraries can also be combined with Bit, which enables you to isolate and manage components in any SCM repository, share them to a Scope to make components individually available to discover and install, and keep them synced between different repositories and projects. 1. React Material-UI React Materi...