What is React Explained

What is React Explained

React is a declarative, efficient, and flexible JavaScript library for building user interfaces.React isolated pieces of code called “components”.

What is React?

.What is react


Now we will see what react actually is

  • Components are what we want to see on screen
  • React update and re-render component based on the state change
  • Component takes parameters called props (short for “properties”)
  • The render method returns a description of what you want to see on the screen.
  • render returns a React element, which is a lightweight description of what to render.
  • Each React element is a JavaScript object that you can store in a variable or pass around in your program
  • JSX comes with the full power of JavaScript. You can put any JavaScript expressions within braces inside JSX.

Below code template just for example we will see each topic in details later posts. First of all what is in the code.

  • Welcome is class component here
  • this.props indicates component property
  • render() method will render the JSX code written inside
  • return <h1>Hello, {this.props.name}</h1>; is a JSX code written inside render method.





Leave a Reply

Your email address will not be published. Required fields are marked *