- JSX is a syntext that is used for writing better and clean code insted of writing code using
React.CreateElement
. It is not required for React.
- React is written in JavaScript so it is not required to follow ES6 syntex to code in React.
-
JSX comments are written as follows:
{/* */}
- for multiline comments//
- for single line comment
-
React.Fragment
is a functional component that is provided by rect.<React.Fragment></React.Fragment>
is an empty tag that does not create extradiv
tag. -
<></>
and<React.Fragment></React.Fragment>
are similer tags. We can use empty tags in place of<React.Fragment></React.Fragment>
as well.
- Virtual DOM is representation of th DOM.
- Reconciliation is a process, where react uses it's diffing algorith to find the differece between the trees to render the changes.
- React fiber is a new reconciliatoin engine in React 16.
-
Keys are the unique identifire through which react knows, how to render a perticuler component.
-
Keys are required when a paarent tag has two or more similer tags in it, so that react can update the component which is needed to be updated without destroying the whole paarent component. It improves the effieciency of the application.
- Yes, we can use the indexes in places of keys, but it is not considered as a good practice to use them. Keys are taken from each object which is being rendered. There might be a possibility that if we modify the incomming data react may reander them in unusual order.
- Props or properties are just parameters that React component uses for any operation.
- Config driven UIs are based on the configuarions of the data application receives. It is rather a good practice to use config driven UIs to make application for dynamic.