1.

What is ReactJS?

Answer»

ReactJS or simply React is a frontend library created by Facebook. It is used in their products like Facebook, WHATSAPP, and Instagram. It was initially maintained by Facebook but later it was MADE open source and now have an active developer community. Popular websites like Netflix, Airbnb, Yahoo! Mail, KhanAcademy, DROPBOX and much more use React to build their UI.

React allow us to create reusable UI components. Suppose you have a website, which has the same header and footer in all pages. If you create it using normal HTML and JS, then you have to use the same HTML code for header and footer in all pages.  But in React you can have the Header and Footer as a separate component and import it into different Pages.

Consider this React code for About Us page.

import React from ‘react’; import Header from ‘./HeaderPage’; import Footer from ‘./FooterPage’; const AboutPage =() => { return( <div>  <Header />   <h1>About Us</h1>   <p>We are a cool web development company, located in Silicon Valley.</p>  <Footer /> </div> ) }; export default AboutPage;

Now, Consider this React code for Services page.

import React from ‘react’; import Header from ‘./HeaderPage’; import Footer from ‘./FooterPage’; const ServicePage =() => { return( <div>  <Header />   <h1>Services</h1>   <p>We provide service in Web development, MOBILE development, SEO services.</p>  <Footer /> </div> ) }; export default ServicePage;

Beside this React is also very fast which reduces the loading TIME of even complex web-apps. React achieves this speed because it doesn’t update the Real DOM directly but it updates the Virtual DOM.



Discussion

No Comment Found