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