Skip to content

Repository files navigation

React Concepts

React is a Java Script Library for building User-Interfaces.

Concepts

1. Don't touch the DOM:

React uses a Declarative approach for manipulating the DOM. When some events are triggered, React reacts to the events based upon the state of the application after the event took place, by manipulating the DOM.

DOM operations are costly as they involve repainting and re-flow operations. So, the Declarative approach is a very effective way of manipulating the DOM as compared to the Imperative approach, where the developer makes use of the DOM API for manipulating the DOM.

2. Component Architecture: A single webpage is composed of components (Lego blocks 🔲🔳). Based upon a separation of concerns rather than separation of markup.

3. Unidirectional Data Flow

4. React Everywhere 🖥 📱

Why React Took Off 🛫 ?

React is a JS UI Library. It accounts for only the DOM modifications after the occurance of an event. So, when compare to Angular (which is a JS Framework) which contains components to control the entire MVC, React is pretty light-weight and easy to implement.

The React Library creates a Virtual DOM, which is a tree representation of all the components(which essentially render views). Every time an event occurs the state of a component changes, which in turn bring changes to the view of that particular component. The modified Virtual DOM after the event is compared with the DOM(the DOM of the web-page in consideration) and re-renders only the changed part, instead of re-rendering the entire page. This drastically improves the performance and responsiveness of web-pages and web-apps.

The component level design to separate concerns, the unidirectional data-flow for more predictive results, makes React stand out from the other libraries/frameworks.

The same React Library is utilized to build web-apps, desktop-apps, mobile-apps, VR-apps and command line interfaces.

Because of the above reasons React became the single most popular framework (as of 2019), used by several popular web-apps like Airbnb, Twitter, Twitch, Mixer, Dribble, etc....

Some Facts

React was created by the Developers at Facebook. 1rst version released in 2013 during JSconf.

React is a SPA

****

About

Notes on React Basics, React Router, Redux, Hooks, Context API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors