A JavaScript library for building user interfaces.
Props are inputs to components. They are single values or objects containing a set of values that are passed to components on creation, similar to HTML-tag attributes.
The attribute class is a keyword in JavaScript, and JSX is an extension of JavaScript. That's the principle reason why React uses className instead of class.
The virtual DOM is an in-memory representation of the real DOM elements. The Virtual DOM allows React to update only what is necessary instead of everything.
A syntax that allows you to group elements without a wrapper node like div. They are useful because they have no effect on layout or styles.
State of a component is an object that holds some information that may change over the lifetime of the component.
The useEffect Hook in React is used for handling side effects in functional components. These side effects can include data fetching, subscriptions, or manually changing the DOM.
The useReducer hook is a React hook used for managing complex state logic. It is an alternative to useState and is generally used when you have a lot of state to update.
The initial state and setter function. The initial state can be any value: a number, string, boolean, array, object, or even a function that returns the state value.
is a React Hook that lets you reference a value that’s not needed for rendering. Sort of like document.querySelector, but won't re-render if the useRef is triggered.
Always at the top level.
The easiest way is to move the state to a common parent and pass it down through props.
ExplanationKeys are unique identifiers that help React know which list item to re-render and swap out.
Explanation