The only answer you need before digging into React
React is a JavaScript library focusing on making UI development simple and spaghetti-free.
React was initially developed by Facebook as a solution to front end problems they are facing:
DOM manipulation is an expensive operation and should be minimized
No library specialized in handling front-end library at the time (there is Angular, but it’s an ENTIRE framework.)
Using a lot of jQuery is causing spaghetti code
In 2013, React was released as an open source library, and since then it has been widely loved by the community.
Why developers love React? As a software developer myself, I can think of a few reasons why I love it:
It is simple to start Running React is not easy since it uses JavaScript to render the view. You’ll need to learn about Webpack and its configuration to run React smoothly. The Facebook Team know this and created a npm package called
create-react-app
for quickly trying React.It’s minimalist in nature React takes care of only ONE thing: the UI. We can think of React as the “V” in an MVC framework. Yes, we can use PHP/Rails/Go/Python or whatever language we prefer for backend.
A strong community support To enhance React’s capabilities, open source contributors have build an amazing ecosystem of libraries that enables us to make even more powerful application. This comes at a cost of increased complexity in the front end.
The bottom line is that with a small learning curve, React gives you incredible power in making your UI flexible, reusable and controlled. The core topics you have to master in React are:
Component
JSX
State
Props
We will discuss about them in future posts, so stay tuned.