It generally the entry point for react application into the browser’s DOM(Document Object Model). It has two arguments. The first one stands for what to render to the browser. It always reacts to elements. the second one stands for where to render the react elements on the browser.
02. Error Boundaries:
03. Ternary operator:
Ternary operators are used to performing conditional rendering if required.
if..else alternative used ternary operator.
i. ternary operator outside return expression,
ii. if/else block outside return expression.
condition? ifTrue: ifFalse
04. Spread Attributes:
we know already have props as an object, and you want to pass it in JSX, you can use … as a “spread” operator to pass the whole props object. And Also calling Spread Operator.
setState() change to the components state .And this component and its children need to re-rendered with the updated state. This is the primary method used to update the user interface in response to event handlers and server responses. and user response update immediately good performance.
06. Conditional rendering:
Conditional rendering is depending on some conditional logic. It’s often needed to render one part of the Html if some conditions are met, and the other if they not. React there are a few ways to do that.
A hook is a react component that is called a special function. All hooks function starts with the “use” word. It is a very stronger function.it is used components and change use components value output. and it is uses function and class both components.
ii. useEffect etc.
React.createElement is a method. Instead of working with strings to represent DOM elements in React, we represent DOM elements with objects using calls to the React.createElement method.
React.createElement has a many arguments:
i. First argument the Html “tag”(div),
ii. the second argument is for any attributes(id,href, etc),
iii. the Third argument is dom element children (output).
Our need when our component’s state or props change, our component will re-render. If our render() method depends on some other data And can tell React that the component needs re-rendering by calling force update().Calling force update() will cause render() to be called on the component, skipping shouldComponentUpdate()
10. Nesting React elements: