Q.1
What are the features of React?
The features of React are as follows:
- JSX: JSX serves as a syntax extension to JavaScript, facilitating the combination of HTML structures with JavaScript code within React files.
- Components: JSX serves as a syntax extension to JavaScript, facilitating the combination of HTML structures with JavaScript code within React files.
- Virtual DOM: React employs a Virtual DOM, which is a lightweight representation of the actual DOM stored in memory. This approach allows React to selectively update only the relevant parts of the real DOM when the state of an object changes.
- Data Binding: React adopts a one-way data-binding approach, ensuring a modular and efficient structure. Unidirectional data flow signifies that in a React app, child components are often nested within parent components.
- High Performance: React's high performance is driven by its ability to update only the components that undergo changes, rather than refreshing the entire set. This results in significantly faster web applications.