Now covers React 19 & Next.js 15

Crack the frontend questions you'll actually be asked.

Clear answers and runnable code for Next.js, React, JavaScript and CSS, plus timed coding tasks. Free, no account needed.

  • ✓Easy to hard
  • ✓Runnable code in every answer
  • ✓Saves your progress
React HooksMedium

What is useReducer and when should you use it over useState?

useReducer is an alternative to useState that is deeply inspired by Redux. It is designed for managing complex state objects or state logic that involves multiple sub-values or interconnected…

import React, { useReducer } from 'react'; // 1. Define initial stateconst initialState = {  data: [],  loading: false,  error: null};
0:00 / 0:28

Three steps.

  1. 1

    Choose a topic and difficulty

    Start easy to refresh the basics, or jump straight to Hard if your interview is close.

  2. 2

    Read the answer, then run the code

    Every answer has an example. Open it in the playground and change it.

  3. 3

    Mark what you know

    Progress is saved in your browser, so you always see what is left.

Start gentle. Finish sharp.

EasyRefresh the basics
MediumBuild confidence
HardInterview-level depth
Open the JS playground

Interview coming up?

Answer your first question in under a minute.

Start practising →