What is React?
A JavaScript library for building user interfaces using a declarative component-based architecture.
What is JSX?
A JavaScript syntax extension that lets you write markup-like code inside JavaScript and compiles to React.createElement calls.
What are components in React?
Reusable UI pieces that describe what should appear on screen and can manage their own state or rely on props.
What are props in React?
Immutable inputs to a component passed from its parent.
What is state in React?
Data managed within a component that can change over time and triggers re-renders when updated.
What is a React Hook?
A special function starting with 'use' that lets functional components use state and other React features.
What is useEffect used for?
It handles side effects such as data fetching, subscriptions, or DOM manipulation after render.
What is useState used for?
It declares a state variable within a functional component and provides a setter to update it.
What is the difference between React 17, 18, and 19?
React 18 added concurrent rendering and automatic batching; React 19 introduces Server Components, the new compiler, and use() for async data.
What are Server Components?
React 19’s components that run on the server to fetch data and stream rendered HTML to the client efficiently.
What are Suspense boundaries?
Declarative async loading boundaries that allow React to pause rendering parts of the UI while data or code loads.
What is React’s useOptimistic hook?
It enables optimistic UI updates — updating UI immediately before a server mutation resolves or fails.
What is the difference between useContext and useReducer?
useContext shares state globally; useReducer manages complex local state transitions. Often combined for global state patterns.
What is the new Actions API in React 19?
An API that allows server-side form actions and optimistic updates using async functions in form ‘action’ attributes.
What is React’s Concurrent Rendering?
React can interrupt and resume rendering work, making UI more responsive and allowing features like Suspense and transitions.