Yesterday, I posted an article called Why would you want to learn VueJS now? and I appreciate all who share their thoughts and experiences with the framework.
Now, it is time to chat about ReactJS. According to many Surveys, ReactJS is the most popular and loved front end library by engineers and I think these are the reasons why.
- Almost everything is implemented by JS. It is very easy to create small, reusable, and dynamic components that can be dropped anywhere in the applications. JSX is definitely super recommended to learn and use. I haven't seen engineers that are not using JSX. 😊
// Class component
class HelloMessage extends React.Component {
render() {
return (
<div>
Hello {this.props.name}
</div>
);
}
}
// Function component
function HelloMessage (props) {
return (
<div>
Hello {props.name}
</div>
)
}
Strong community. First built by Facebook and then have the support of the open-source community. Lots of smart people here that have big brains 🧠.
Jobs 💰💼. Demand is real. It is the top skill that most companies are looking for. It is easier to find contractors that know who to use react than other JS lib/frameworks.
Library is fast ⚡💨. One of the first innovators of the Virtual Dom or VDOM which is a copy of the real DOM. When data changes on the VDOM, ReactJS efficiently updates only the necessary parts of the DOM which is faster than updating everything in the DOM.
I might offend someone by this entry, please don't be just my thought. Some engineers got frustrated with Angular rewrite and found a better alternative. Talking about perfect timing. I was a big fan of Angular especially the time I first saw the 2-way data binding, directives, and dep injection. I was shocked 😱. Couple of lines of code can achieve something like those.
Learn once then you open your door into building lots of things. You can use React to create a complex web app. Also, you can use NextJS to pre-render pages, not going to in-depth details, which is very advantageous and have its use cases. Lastly, is you can build a mobile app using React Native.
Is there anything else that you like that I missed?
Got 3 minutes? Below is a youtube video. Happy coding!
If you want to support me - Buy Me A Coffee
Good article,
What do you think is the biggest selling point of ReactJs VS standard web components?