Hello Everyone! I am new born baby in the world of web development as well to this site.
I am working for a company in which few days back they decided to work on some internal project and they decided to use ReactJS in it.
As I said that I am new born baby to this. I have several questions that's pops up in my mind. So, the first question that comes to my mind is Why React ? What were people using before when React was not there? What feature does React give us that others don't?
I have gone through ReactJS documentation where I saw example of SPA(Single Page Application). It convinced me a little bit that it's a good tool to build UI at client side very effectively. But then I read somewhere about SSR(Server Side Rendering). So, now question is what are the benefits of rendering at server side?
I understand that it give SEO benefits. But still question arises in mind that why ReactJS? What's React better at compared to other tools. Please help me understand it in a better way.
Thank you.
As a business owner, react is a sensible framework to choose for a particular project because of the amount of developers that now know the framework.
If you choose some obscure framework, or get your developers to build a custom framework for you project needs, then the next developers to come and work on your project will have a barrier to entry to learn the code. If you chose React, then they just need to learn the use-case and they can easily write code for your project with litte-to-no barrier to entry.
I think it is important to evaluate these decisions on more basis' than just the programming side. It also makes good business sense to choose React.
Hey Faisal, React is a JavaScript library developed by Facebook for building user interfaces. Prior to React, people were using plain vanilla JavaScript, JQuery etc for building client-side applications. Facebook felt the need to build a library of their own when they realized that the existing solutions are not scalable and that it takes more time to develop stuff using existing techniques.
DOM operations are expensive. With traditional techniques, even for updating a particular nested DOM node, the entire parent container is to be re-rendered to make space for the new one. React solves this problem by using Virtual DOM. It efficiently updates only that part of the DOM that is changed/modified.
Also, React follows a component-based approach, which makes it easy to reuse code at different places.
In short and I think it's not just valid for react but for all framworks/libraries out there:
It helps you to structure your code. Libraries like react don't provide new stuff that wasn't possible before. But they are more accessable and easier to use than before.
And the choice of the tooling resides on personal preferences and/or requirements from the company off existing code bases.
Keyur Patel
TechLead
ReactJS basically is an open-source JavaScript library which is used for building user interfaces specifically for single page applications. It’s used for handling view layer for web and mobile apps. React also allows us to create reusable UI components. React was first created by Jordan Walke, a software engineer working for Facebook. React first deployed on Facebook’s newsfeed in 2011 and on Instagram.com in 2012.
React allows developers to create large web applications which can change data, without reloading the page. The main purpose of React is to be fast, scalable, and simple. It works only on user interfaces in application. This corresponds to view in the MVC template. It can be used with a combination of other JavaScript libraries or frameworks, such as Angular JS in MVC.