18 State & Effect Hooks questions from the React bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.the function returned from useEffect, run before the next effect and on unmount
B.a hook returning a stateful value and a setter that triggers a re-render when called
C.hooks must be called at the top level in the same order every render, only from React functions
D.useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
Answer + AI explanation with Pro
2. Which term means: "a hook returning a stateful value and a setter that triggers a re-render when called"?
Junior
A.Dependency array
B.useState
C.useEffect
D.Rules of Hooks
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.useState — hooks must be called at the top level in the same order every render, only from React functions
B.useState — a hook returning a stateful value and a setter that triggers a re-render when called
C.useState — like useEffect but fires synchronously after DOM mutations and before the browser paints
D.useState — the function returned from useEffect, run before the next effect and on unmount
Answer + AI explanation with Pro
4. What is useEffect?
Junior
A.like useEffect but fires synchronously after DOM mutations and before the browser paints
B.a hook returning a stateful value and a setter that triggers a re-render when called
C.hooks must be called at the top level in the same order every render, only from React functions
D.a hook that runs side effects after render and re-runs when its dependency array changes
Answer + AI explanation with Pro
5. Which term means: "a hook that runs side effects after render and re-runs when its dependency array changes"?
Junior
A.useEffect
B.Rules of Hooks
C.Effect cleanup
D.Dependency array
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.useEffect — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
B.useEffect — like useEffect but fires synchronously after DOM mutations and before the browser paints
C.useEffect — a hook returning a stateful value and a setter that triggers a re-render when called
D.useEffect — a hook that runs side effects after render and re-runs when its dependency array changes
Answer + AI explanation with Pro
7. What is Effect cleanup?
Mid
A.a hook that runs side effects after render and re-runs when its dependency array changes
B.a hook returning a stateful value and a setter that triggers a re-render when called
C.like useEffect but fires synchronously after DOM mutations and before the browser paints
D.the function returned from useEffect, run before the next effect and on unmount
Answer + AI explanation with Pro
8. Which term means: "the function returned from useEffect, run before the next effect and on unmount"?
Mid
A.Dependency array
B.useLayoutEffect
C.Rules of Hooks
D.Effect cleanup
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.Effect cleanup — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
B.Effect cleanup — a hook returning a stateful value and a setter that triggers a re-render when called
C.Effect cleanup — the function returned from useEffect, run before the next effect and on unmount
D.Effect cleanup — hooks must be called at the top level in the same order every render, only from React functions
Answer + AI explanation with Pro
10. What is Dependency array?
Junior
A.hooks must be called at the top level in the same order every render, only from React functions
B.like useEffect but fires synchronously after DOM mutations and before the browser paints
C.a hook returning a stateful value and a setter that triggers a re-render when called
D.useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
Answer + AI explanation with Pro
11. Which term means: "useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount"?
Junior
A.Dependency array
B.Effect cleanup
C.Rules of Hooks
D.useState
Answer + AI explanation with Pro
12. Which statement is correct?
Junior
A.Dependency array — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
B.Dependency array — the function returned from useEffect, run before the next effect and on unmount
C.Dependency array — hooks must be called at the top level in the same order every render, only from React functions
D.Dependency array — a hook returning a stateful value and a setter that triggers a re-render when called
Answer + AI explanation with Pro
13. What is Rules of Hooks?
Mid
A.hooks must be called at the top level in the same order every render, only from React functions
B.a hook returning a stateful value and a setter that triggers a re-render when called
C.the function returned from useEffect, run before the next effect and on unmount
D.useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
Answer + AI explanation with Pro
14. Which term means: "hooks must be called at the top level in the same order every render, only from React functions"?
Mid
A.Rules of Hooks
B.Effect cleanup
C.useState
D.Dependency array
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.Rules of Hooks — the function returned from useEffect, run before the next effect and on unmount
B.Rules of Hooks — hooks must be called at the top level in the same order every render, only from React functions
C.Rules of Hooks — like useEffect but fires synchronously after DOM mutations and before the browser paints
D.Rules of Hooks — a hook that runs side effects after render and re-runs when its dependency array changes
Answer + AI explanation with Pro
16. What is useLayoutEffect?
Senior
A.like useEffect but fires synchronously after DOM mutations and before the browser paints
B.a hook that runs side effects after render and re-runs when its dependency array changes
C.the function returned from useEffect, run before the next effect and on unmount
D.useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
Answer + AI explanation with Pro
17. Which term means: "like useEffect but fires synchronously after DOM mutations and before the browser paints"?
Senior
A.Dependency array
B.useLayoutEffect
C.Effect cleanup
D.useEffect
Answer + AI explanation with Pro
18. Which statement is correct?
Senior
A.useLayoutEffect — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
B.useLayoutEffect — like useEffect but fires synchronously after DOM mutations and before the browser paints
C.useLayoutEffect — a hook that runs side effects after render and re-runs when its dependency array changes
D.useLayoutEffect — the function returned from useEffect, run before the next effect and on unmount
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every State & Effect Hooks question come with Pro.