Skip to content

Overview of React JS by Ashvin Chauhan

What is React

  • React is a declarative, efficient, and flexible JavaScript library for building user interfaces.
  • React is often described as “the V in the MVC structure”. This also happens to be the least tangible explanation one could give a newcomer, as (V)iews are typically logic-less files that are driven by a controller.

Why we need React

  • React uses a special syntax called JSX, which allows you to mix HTML with JavaScript.
  • React creates its own virtual DOM where your components actually live. This approach gives you enormous flexibility and amazing gains in performance because React calculates what changes need to be made in the DOM beforehand and updates the DOM tree accordingly.

Demo

When we have to use React?

  • If you want to lean quickly compare to other languages with excellent performance.
  • In the application/site if you have too much repetitive sections/div.
  • Flux support – It is useful for unidirectional data flow from the components.
  • Redux support – Which works well with the react which provide the offline (client side) cache system. Which execute the app very fast.

React Native

  • You can write native apps for Android and iOS using React Native. Although you will not be able to use the exact same code you wrote for web, you will be able to use the same methodology and the same architecture.
  • You can use react application when your project is larger n which you want to reuse components easily or projects where data is changing frequently and you do not want to think through the state transitions manually

Tools

  • There are two great tools you should be aware of: React Developer Tools and Redux Developer Tools. Both can be installed as Chrome extensions.
  • React Developer Tools is great for inspecting react components within their hierarchy and also great for observing their current props and states.

Benefit of React JS

  • Easy interface design and learning API.
  • Significant performance gains over other JavaScript frameworks.
  • Creating a minimal list of update portions to be made to the real DOM to bring it in sync, rather than having to re-render the entire site on each change.
  • Server-side rendering allows to create isomorphic/universal web apps.
  • Easy import of components although having very little dependencies.
  • Can convert in mobile app using react native.
  • Can provide the offline caching with support of redux/reflux.

Further Reading

 

Credit : Special thank to Ashvin Chauhan for such a good overview regarding the react.

Leave a Reply

Discover more from Techplus Software Pvt Ltd

Subscribe now to keep reading and get access to the full archive.

Continue reading