1. What is React (JS React)?
- React is a JavaScript library used for building user interfaces (UI), especially Single Page Applications (SPA).
- It was developed and is maintained by Meta (Facebook).
- React is component-based, meaning the UI is built using small, reusable blocks called components.
- It uses a Virtual DOM for fast and efficient UI updates.
-
Types of components:
- Functional components
- Class components
Components can manage state and receive props to handle dynamic data.
2. Framework vs Library
- A Library is a collection of reusable code where you control the flow of your application (e.g., React for UI rendering).
- A Framework provides a complete structure and controls the flow, deciding how your code fits in (e.g., Angular, Django).
- Library → You call it.
- Framework → It calls you.
Top comments (0)