← Questions

React list loaded with useEffect

0
SpaceXAICodingLast asked Sep 2026

A coding interview question asked in SpaceXAI's onsite applied coding round, last asked Sep 2026. It tests react, frontend and hooks.

Write a React component that loads a list from an endpoint with useEffect and displays it, with loading, empty, success and error states. When the endpoint changes, a response for the old endpoint must never replace the new one's data.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

react · frontend · hooks

Your code and the AI tutor open when you unlock this question.