Top ReactJS Questions & Practice
Master 60 essential ReactJS questions ranging from core fundamentals to senior-level real-world scenarios.
Junior Fundamentals — Question 1
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is React?
Junior Fundamentals — Question 2
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is JSX?
Junior Fundamentals — Question 3
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is a React component?
Junior Fundamentals — Question 4
Explain the underlying React mental model.
Connect the answer to a production scenario.
What are props?
Junior Fundamentals — Question 5
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is state?
Junior Fundamentals — Question 6
Explain the underlying React mental model.
Connect the answer to a production scenario.
Why should render logic be pure?
Junior Fundamentals — Question 7
Explain the underlying React mental model.
Connect the answer to a production scenario.
What does a key identify in a React list?
Junior Fundamentals — Question 8
Explain the underlying React mental model.
Connect the answer to a production scenario.
Why are stable IDs preferred over array indexes as keys?
Junior Fundamentals — Question 9
Explain the underlying React mental model.
Connect the answer to a production scenario.
What does useState return?
Junior Fundamentals — Question 10
Explain the underlying React mental model.
Connect the answer to a production scenario.
What does a state setter do?
Core APIs & State Management — Question 1
Explain the underlying React mental model.
Connect the answer to a production scenario.
When should a functional state updater be used?
Core APIs & State Management — Question 2
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is lifting state up?
Core APIs & State Management — Question 3
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is Context primarily useful for?
Core APIs & State Management — Question 4
Explain the underlying React mental model.
Connect the answer to a production scenario.
Is Context automatically a replacement for all global state management?
Core APIs & State Management — Question 5
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is useReducer best suited for?
Core APIs & State Management — Question 6
Explain the underlying React mental model.
Connect the answer to a production scenario.
What should a reducer avoid?
Core APIs & State Management — Question 7
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is derived state?
Core APIs & State Management — Question 8
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is a controlled input?
Core APIs & State Management — Question 9
Explain the underlying React mental model.
Connect the answer to a production scenario.
Which prop controls a checkbox's boolean state?
Core APIs & State Management — Question 10
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is a good reason to use a reducer?
Hooks, Effects & Closures — Question 1
Explain the underlying React mental model.
Connect the answer to a production scenario.
Where can Hooks be called?
Hooks, Effects & Closures — Question 2
Explain the underlying React mental model.
Connect the answer to a production scenario.
Why must Hooks not be called conditionally?
Hooks, Effects & Closures — Question 3
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is useEffect primarily for?
Hooks, Effects & Closures — Question 4
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is effect cleanup for?
Hooks, Effects & Closures — Question 5
Explain the underlying React mental model.
Connect the answer to a production scenario.
What is a stale closure?
Hooks, Effects & Closures — Question 6
Explain the underlying React mental model.
Connect the answer to a production scenario.
What does useRef provide?
Hooks, Effects & Closures — Question 7
Explain the underlying React mental model.
Connect the answer to a production scenario.
When should state be preferred over a ref?
Hooks, Effects & Closures — Question 8
Explain the underlying React mental model.
Connect the answer to a production scenario.
What does useMemo cache?
Hooks, Effects & Closures — Question 9
Explain the underlying React mental model.
Connect the answer to a production scenario.
What does useCallback cache?
Hooks, Effects & Closures — Question 10
Explain the underlying React mental model.
Connect the answer to a production scenario.
Should every callback be wrapped in useCallback?