Ten exam-style questions written in the format of the published practice sheet
(Question 1: "Projects Managed by Your Team"). Every question is solvable using
only patterns that appear in the instructor's react-class-code/src files — the
professor said mastery of that code guarantees a 100%, so nothing here reaches
outside it.
practice-questions/
├── QUESTIONS.md ← all ten prompts in one place (print this, attempt blind)
├── COVERAGE.md ← which class file each question drills
├── qNN-name/
│ ├── PROMPT.md ← the question, exam wording
│ ├── RUBRIC.md ← self-grading checklist (5 pts) — read AFTER attempting
│ ├── starter/ ← the provided App.js driver + skeleton files with TODOs
│ └── solution/ ← worked solution
npx create-react-app my-first-app
cd my-first-appThen per question:
- Copy
qNN/starter/*intosrc/(overwritingApp.js). Q10 also needsdata.jsoncopied intopublic/. - Set a timer — 20 minutes for one question is a realistic exam pace.
- Fill in the skeleton files. Never edit App.js — the driver defines the props your component must accept, exactly like the real exam.
npm startand check the behavior described under "Expected".- Only then open
RUBRIC.md, grade yourself, and diff againstsolution/.
Re-usable scaffold: ../midterm-2-exam-kit/reference-app is already on the class
stack (react 18.2.0 / react-scripts 5.0.1) if you'd rather not wait on CRA.
Warm-up → exam-realistic → stretch:
| Order | Question | Why |
|---|---|---|
| 1 | Q1 Course Catalog | props + map + keys only, no state |
| 2 | Q2 Vote Counter | first useState, props-driven behavior |
| 3 | Q7 Rating Picker | functions as props / lifting state up |
| 4 | Q3 Team Roster | controlled input + add/delete |
| 5 | Q5 Student Table | table composition + controlled select |
| 6 | Q8 Inventory | object state, Object.entries, Set |
| 7 | Q6 Signup Form | every input type at once |
| 8 | Q4 Hardware Checkout | closest to the real practice question + team project |
| 9 | Q9 Thermostat | class component, this.setState, binding |
| 10 | Q10 Fetch List | stretch: useEffect + fetch |
If you only have time for three, do Q4, Q3, Q7 — those cover the parent-owns-state / child-calls-callback / map-with-keys triangle that the published practice question is built from.
- File names and component names must match the question exactly.
export default X;at the bottom of every file;import X from './X';with no braces.- Never modify the provided
App.js. - Every
.map()over components needs akey. onClick={handler}— notonClick={handler()}.- Controlled inputs need both
valueandonChange. - Never mutate state:
[...list, item],{ ...obj, [k]: v },new Set(prev).