The promise resolves but nothing sets the state.
Acceptance criteria
- 1.#value should show done.
The promise resolves but nothing sets the state.
function load() { return Promise.resolve({ label: "Ada" }) } function App() { const [stage, setStage] = React.useState("loading") React.useEffect(() => { load() }, []) return <p id="value">{stage}</p> } const root = ReactDOM.createRoot(document.getElementById("root")) root.render(<App />)
Output ready when you are
Press Run to render your code, or Submit to validate your solution.