In this blog we will learn, what is React and why we use React Js?
What is React
React is an Open-Source JavaScript library providing a view for data rendered as HTML. React is used for building user Interface and Single page application
It was developed by Facebook Engineer "Jorden Walke ",
React was first deployed on Facebook in 2011 and on Instagram in 2012.
React can be used into the frontend development of single page website and mobile Applications.
Note - Most People think React is a Framework but it's not framework it is a Library of JavaScript
Why We use React?
You might be thinking why you should use React Js. After all, as the uses of JavaScript have increased in recent years, but we now have multiple options available in the market like Angular Js and Vue Js etc. So why we should choose React JS?
React have many Advantages these that can make React js more reliable, compatible and efficient than other options.
1. Simplicity
React is just simpler to learn right away. React uses component-based approach it uses plain JavaScript that make react very simple and understandable, Trough JavaScript we can make professional web and Mobile application
JSX- React uses a special syntax called JSX which allows you to mix HTML and JavaScript. JSX is not compulsory, developer can still write in plain JavaScript, but JSX is much easier to use.
2. Reusable Components (Reusability)
Reusability is main feature of React Js which can make easier and clean. React provides a component-based Structure, component are small pieces of code. So, we can easily break our website into reusable component that we can change and create individual component as per our need; it provides fast performance for website for reloading and refreshing.
It starts with small components like button, checkbox, dropdown etc. and then we create wrapper component composed for those smaller components, we can create component inside another component until you have root component, and that component is your React App.
3. Easy to learn
Anyone can learn and understand React with a basic knowledge of programming while Angular and Ember are required Domain specific language that is difficult to learn. For React we just need basic knowledge of HTML & CSS and JavaScript
4. Native Approach
React is also used to create mobile application using React Native. React support extensive code reusability; so, at the same time we can make iOS, Android, and web Applications, although you will not be able to use the exact same code you as you write for web, you will able to use same methodology and same architecture.