Basics
What is React?
Tap to flipAnswer
A JavaScript library for building user interfaces using a declarative component-based architecture.
Basics
What is JSX?
Tap to flipAnswer
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 flipAnswer
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 flipAnswer
Immutable inputs to a component passed from its parent.
Basics
What is state in React?
Tap to flipAnswer
Data managed within a component that can change over time and triggers re-renders when updated.
Hooks
What is a React Hook?
Tap to flipAnswer
A special function starting with 'use' that lets functional components use state and other React features.
Hooks
What is useEffect used for?
Tap to flipAnswer
It handles side effects such as data fetching, subscriptions, or DOM manipulation after render.
Hooks
What is useState used for?
Tap to flipAnswer
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 flipAnswer
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 flipAnswer
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 flipAnswer
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 flipAnswer
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 flipAnswer
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 flipAnswer
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 flipAnswer
React can interrupt and resume rendering work, making UI more responsive and allowing features like Suspense and transitions.