Skip to content
codinganthem

React skill check

Check your React: state and props, hooks and effects, rendering and keys, context, and performance, including small components where you decide what renders. Answers assume React 19 with function components.

15

Questions

11 min

Timer can't pause

Multiple choice

React 19

Choose a level

Topics

  • Components and props
  • State
  • Hooks
  • Effects
  • Rendering and keys
  • Context
  • Performance
  • Forms

Do

Use scratch paper or a notepad to work things out. Skip a question and come back to it later.

Don't

Look up answers during the check. Open the check in more than one tab or window.

Easy · 15 questions · 11 min

By starting, you agree to the Terms and Privacy Policy.

Start practice

Practice checks each answer as you go, with an explanation. The exam is checked when you submit; 9 of 15 passes and earns a certificate.

Checking your levels…

Certificates come from the certified exam: pass with 9 of 15 while signed in. View a sample certificate.

Sample React questions with answers

These are never used in a check, so seeing their answers here won't give anything away.

  1. Question 1 · Easy · Rendering and keys

    Why does the React documentation strongly discourage using an item's array index as its key prop when rendering a dynamic list?
    1. A.React requires keys to be strings, so numeric indices trigger runtime warnings.
    2. B.Reordering, inserting, or deleting items can associate component state with the wrong DOM elements.
    3. C.Array indices cause React to bypass DOM reconciliation entirely on re-renders.
    4. D.Using index keys forces React to recreate the entire parent list component from scratch.
    Show answer

    B. Reordering, inserting, or deleting items can associate component state with the wrong DOM elements.

    Keys allow React to identify which items have changed, been added, or been removed. Using index keys when the order of items changes can cause local component state or uncontrolled inputs to be incorrectly preserved across different items.
  2. Question 2 · Easy · Components and props

    In React 19, how can a functional component access a ref passed from its parent component without wrapping the child in forwardRef?
    1. A.By attaching the useRef hook directly to the parent JSX element.
    2. B.By calling React.captureRef inside the component body.
    3. C.By accessing ref directly as a standard prop in the component's argument list.
    4. D.By declaring a useParentRef hook inside the child component body.
    Show answer

    C. By accessing ref directly as a standard prop in the component's argument list.

    In React 19, function components can accept ref directly as a regular prop, deprecating the need for React.forwardRef in new code.
  3. Question 3 · Moderate · Hooks

    A developer writes a custom hook that returns a callback wrapped in useCallback. When should consumer components expect the identity of this callback to change?
    1. A.Whenever the parent component passes new non-primitive props to the child.
    2. B.Only when the browser window loses focus and triggers garbage collection.
    3. C.On every re-render of the component calling the custom hook.
    4. D.Only when one of the values listed in the hook's dependency array changes.
    Show answer

    D. Only when one of the values listed in the hook's dependency array changes.

    useCallback caches a function definition between renders until one of its declared dependencies changes according to Object.is equality.
  4. Question 4 · Advanced · State

    What is the expected behavior when an asynchronous Action function passed to React 19's useActionState throws an unhandled error?
    1. A.The error bubbles up to the nearest Error Boundary while isPending transitions back to false.
    2. B.The action retries execution up to three times before failing silently.
    3. C.isPending stays indefinitely true until another action is dispatched.
    4. D.The error is caught by useActionState and returned as the state value.
    Show answer

    A. The error bubbles up to the nearest Error Boundary while isPending transitions back to false.

    Unhandled errors inside an Action dispatched via useActionState propagate to the nearest Error Boundary, and React resets the pending state.

How scoring and certificates work

  • Each check has 15 multiple-choice questions with one correct answer, and one timer for the whole check. A question you leave unanswered scores nothing.
  • Practice is free without an account and shows whether each answer is right as you go, with an explanation.
  • The certified exam is scored when you submit. 60% passes, which is 9 of 15. Easy unlocks Moderate, and Moderate unlocks Advanced.
  • Passing the exam while signed in earns a free certificate, valid for one year, with its own verification page. See a sample certificate.

Free tools for React: JavaScript Formatter, JSON to TypeScript, CSS Gradient Generator