- React Lifecycle
Each component in React has a lifecycle which you can monitor and manipulate during its three main phases. The three phases are: Mounting, Updating, and Unmounting. Mounting Mounting means putting elements into the DOM. React has four built-in methods that gets called, in this order, when mounting…
- React State
React components has a built-in state object. The state object is where you store property values that belongs to the component. When the state object changes, the component re-renders. State is similar to props, but it is private and fully controlled by the component. class Profile extends…
- React Props
Props are like function arguments, and you send them into the component as attributes. Props are passed to components via HTML attributes. React Props are like function arguments in JavaScript and attributes in HTML Passing props is how information flows in React apps, from parents to children. To…
- React Render HTML
React renders HTML using ReactDOM.render(). React DOM compares the element and its children to the previous one, and only applies the DOM updates necessary to bring the DOM to the desired state. import React from ‘react’; class App extends React.Component { render() { return ( <div> <Header/>…
- React JSX
JSX allows us to write HTML elements in JavaScript and place them in the DOM without any createElement() and/or appendChild() methods. JSX converts HTML tags into react elements. You are not required to use JSX, but JSX makes it easier to write React applications. JSX is a syntax extension to…