React.js features that made it so popular and fun to work with

Meer Estiyak
4 min readMay 7, 2021

Hello and welcome to my another article. In today’s article we will be discussing about some features that made react.js so popular today, so without further ado, let’s dive in

Declarative

React.js works in declarative way, usually when we create a piece of UI with vanilla JavaScript we need to do so many things, first we need to grab the element then need to put content in it line by line or we need to create a element with the help of vanilla JavaScript API then put content in it and insert to the DOM which is imperative way of writing code and really time consuming as well distracts us from focusing on core functionalities of application.

But in react.js we just need to say that this is what we want to show on the UI, react.js takes all of our pain, we just need to define that this is what we want to show and react.js does rest of it. It’s great for developers as it’s taking away so many works and it’s good for performance as well because react.js knows better way of rendering UI on the webpage than us.

Unidirectional Data Flow

React.js follows unidirectional data flow, when we work with vanilla JavaScript Our data flows everywhere from this function to that function, from that module to this module and so on, it just starts to get messy and when it’s a big project it become impossible to keep the project scalable and maintainable, So what step did react.js took in order to solve this problem?
React.js follows the unidirectional data flow means data can flow just one way that means data in react.js just can flow from parent to children components not children to parent components which made is super easy to manage data and make application easy to debug, maintain and scale

Component Architecture

Every UI piece in react.js is just a component and simply component is a function that takes some arguments in and returns a piece of UI. for this component architecture we can divide our application interface in many pieces which increases the possibility of reusability of code also makes it easy to maintain and scale application. and the biggest benefit of this component architecture in react.js is that we all have some common piece of UI that we use so many times and for this feature we can now create a UI piece once and use many times in application or even in a new application.

Virtual DOM

As React.js works in declarative way which we have already discussed above, We Really don’t touch actual DOM, react.js does it for us. react.js uses state and we put all the data inside state that might change on users actions. when we work with vanilla JavaScript we work with native web API and if something changes on our webpage depending on user actions the whole DOM gets updated and the webpage re-painted which may occur performance issues, What virtual DOM in react.js is that before changing the actual DOM React Virtual DOM find out that exactly what changed in webpage then it changes only that part in actual DOM as a result our application’s performance is so great!

Huge Library Collection

As React is a library and it’s all about component, So most of the time we react.js developers don’t need to write everything from scratch there are many great component libraries out there, we just need to find what we need and copy that component in our application which so so amazing and for amazing people it’s increasing day by day developers around the world contributing to libraries and making it so huge. some of the most popular react libraries are Material-UI , Ant Design, React-bootstrap and so on.

It’s Stable

React.js is created by facebook and facebook uses this as well some other tech giant like netflix, twitter, instagram and so on. every time react.js library gets updated before releasing the updated version first facebook uses this library to test then releases it, so it’s so hard to find bugs in react.js and that’s why it’s stable and loved by developers

It’s easy to start with

starting a library or framework requires lots of configuration and other stuffs even before start writing on that library or framework and it’s quite bore to beginners, they feel overwhelmed and never learn as well every time configuring before starting a project is time consuming but good news is facebook provides us a package named create-react-app which is a npm package and with the help of this we can setup a react-project in minutes and we don’t need to care about configuration stuffs.

So What are you looking for? Just start learning react.js It’s Quite Amazing technology to making applications also it has a great demand in jobs around the world. Just start!

Today i’m going to finish it here, i love sharing what i know, that’s why writing from you guys, please let me know if you want to hear from me about any specific react topic, i’ll definitely try. and if you get something wrong with this please let me know, i’m always happy to learn from you!

--

--