Fundamentals
React Fundamentals Test
20 multiple choice questions on React: components, props and state, hooks, effects, lists and rendering.
- Questions
- 20
- Time
- 20 min
- Pass mark
- 60%
No account or email needed.
About this test
This test covers the ideas behind everyday React work: how components receive data, how state updates, what the main hooks do and what the rules of hooks are, and how React decides what to re-render.
It is written for developers who have built at least a small React app. If a question surprises you, read the explanation on the results page.
What it covers
The question set has 24 questions: 12 easy, 10 medium and 2 hard. Each attempt draws 20 of them at random, so a second try is not the same test.
- React (24)
Try a few sample questions
These are real questions from the set, with the answers and a short explanation. Read the question, decide, then open it to check.
Sample 1 · React · easyWhat does JSX turn into when your code is built?Show the answer
- HTML strings
- Function calls that create React elementsCorrect
- CSS rules
- Web components
JSX is syntax for creating elements. A compiler turns it into function calls such as React.createElement or the jsx runtime.
Sample 2 · React · easyWhich hook adds state to a function component?Show the answer
- useEffect
- useStateCorrect
- useRef
- useContext
useState returns the current value and a function to update it.
Sample 3 · React · easyA component should change its own props to update what it shows.Show the answer
- True
- FalseCorrect
Props are read-only. A component keeps changing values in state, and the parent changes props.
How it works
- 20 multiple choice questions, drawn at random from a larger set.
- 20 minutes on the clock. The test submits itself when time runs out.
- Pass mark: 60%.
- No marks are taken off for wrong answers, so answer every question.
- Some questions have more than one correct answer. You must pick all of them to score.
- When you finish you see your score, the correct answers and a short explanation for each.
- Your answers save as you go, so a dropped connection will not lose your work.
- Please stay on the test page. Switching to another tab or window is recorded and you will see a warning.
- Copying text, printing and screenshots are not allowed during the test.
More practice tests
- Git and Web Basics TestFundamentals
- JavaScript Fundamentals TestFundamentals
- Python Basics TestFundamentals
- SQL Basics TestFundamentals
See all practice tests.
