What appears on screen when items is empty?
function List({ items }) { return <div>{items.length && <p>Has items</p>}</div>;}What this React test measures, in short
This test checks whether you understand how React actually renders: what JSX outputs, why state is a snapshot per render, when effects and their cleanups run, why refs don't trigger renders, what the Rules of Hooks protect, and how keys and memoisation affect what updates.
Questions use function components and hooks (React 18 and 19). Class components and specific frameworks like Next.js aren't covered. The questions are our own and not standardised, so treat the result as a knowledge check, not a certification.
By What's Your IQ · Reviewed 4 Oct 2026- Format
- 15 questions on what renders or logs, 4 options each
- Topics
- Rendering and JSX, state, effects, hooks and refs, lists and performance
- Assumes
- Comfortable JavaScript (closures, array methods)
- Library
- Created at Facebook by Jordan Walke; open-sourced 2013
Same three calls, different answers
State is a snapshot: inside one render, count never changes. React queues your updates and processes them before the next render. Click each button and watch the queue.
// this render: count = 0setCount(count + 1);setCount(count + 1);setCount(count + 1);
// this render: count = 0setCount(c => c + 1);setCount(c => c + 1);setCount(c => c + 1);
It renders, but it'll bite you later
const [items, setItems] = useState([]);const [total, setTotal] = useState(0);useEffect(() => { setTotal(items.reduce((s, i) => s + i.price, 0));}, [items]);const [items, setItems] = useState([]);const total = items.reduce( (s, i) => s + i.price, 0);
If a value can be calculated from props or state, calculate it during render. Syncing it with an effect costs an extra render and can drift out of date.
- Honeypot. (2023). React.js: The documentary.
- React Team. (2019). React v16.8: The one with hooks. React Blog.
- React Team. React 18 and React 19 release posts. react.dev.