What is React ? How to use it ?

React is a popular JavaScript library for building user interfaces, particularly single-page applications where you want a dynamic and responsive user experience. Developed and maintained by Facebook, React allows developers…

Written by

Avatar photo
Admin
What is React ? How to use it ?

  • Component-Based Architecture:

    React applications are built using components, which are modular, reusable pieces of the UI.
  • Virtual DOM:

    React uses a virtual representation of the DOM to optimize rendering and update only the parts of the UI that change.
  • JSX:

    A syntax extension that allows you to write HTML-like code within JavaScript, making it easier to create React elements.
  • One-Way Data Binding:

    Data flows in one direction, making the code more predictable and easier to debug.
  • State and Props Management:

    React provides a way to manage dynamic data in components using state and props.

  • node_modules/ – contains all the npm packages
  • public/ – contains the public assets like index.html
  • src/ – contains the source code of your React application
  • index.js – the entry point of the application
  • App.css – the styles for the App component
Props:

Short for properties, props are read-only data passed from a parent component to a child component

State:

State is a way to store and manage dynamic data within a component.