React is a front-end library, focused on building user interfaces for web applications. Facebook created React.js in 2011. In 2012, Instagram also started using it. It can, be combined with other third-party libraries.
When to use
Not every project needs or should use React. React is a high-powered tool, in conjunction library like Redux or MobX. If involves different, dynamic inputs, buttons active/disabled, user login – then the project may be a good fit for React. React helps you manage those changing states and views to the user based on state information.
A React component can be anything in your web application like a Button, Text, Label, or Grid. Components are first class members in React and supports the creation at any time, combine, with other components.
It also speeds up the process of making changes to a component.
Something that has been built once can get reused in multiple places.
Redux provides a single state container. It follows a simplified flux pattern where you keep all your application data. It becomes a single source of truth and it makes it easier to manipulate relevant data. This happens in the memory, so it is speedy.
Efficiency comes from React’s use of a Virtual DOM by keeping a virtual copy of the page’s DOM. We will see more about the virtual DOM in the following topic. When a change occurs, React compares the current DOM with the incoming change. Instead of the entire thing, this causes the browser to only re-render a small part of the page.
This makes React much more efficient where changes occur frequently. React is remarkably flexible. you can use it to build quality user interfaces. Its library approach has allowed to evolve into a remarkable tool. You can change a small part of your existing application by using React, and you can start converting your whole application into React.js.
Benefits like avoiding layout trashing, when the DOM element changes. So, saving battery and CPU power is very important.
Storybook supports the component driven design concept. It also provides designers and developers to build highly reusable components which they will live in the application.
Reactiflux is a community specially in helping solve and share React-related problems. There are over 250k questions asked about React and related libraries.
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
No votes so far! Be the first to rate this post.
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!