State & Effect Hooks interview questions

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.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is useState?

Junior
  1. A.the function returned from useEffect, run before the next effect and on unmount
  2. B.a hook returning a stateful value and a setter that triggers a re-render when called
  3. C.hooks must be called at the top level in the same order every render, only from React functions
  4. 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
  1. A.Dependency array
  2. B.useState
  3. C.useEffect
  4. D.Rules of Hooks

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.useState — hooks must be called at the top level in the same order every render, only from React functions
  2. B.useState — a hook returning a stateful value and a setter that triggers a re-render when called
  3. C.useState — like useEffect but fires synchronously after DOM mutations and before the browser paints
  4. 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
  1. A.like useEffect but fires synchronously after DOM mutations and before the browser paints
  2. B.a hook returning a stateful value and a setter that triggers a re-render when called
  3. C.hooks must be called at the top level in the same order every render, only from React functions
  4. 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
  1. A.useEffect
  2. B.Rules of Hooks
  3. C.Effect cleanup
  4. D.Dependency array

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.useEffect — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
  2. B.useEffect — like useEffect but fires synchronously after DOM mutations and before the browser paints
  3. C.useEffect — a hook returning a stateful value and a setter that triggers a re-render when called
  4. 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
  1. A.a hook that runs side effects after render and re-runs when its dependency array changes
  2. B.a hook returning a stateful value and a setter that triggers a re-render when called
  3. C.like useEffect but fires synchronously after DOM mutations and before the browser paints
  4. 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
  1. A.Dependency array
  2. B.useLayoutEffect
  3. C.Rules of Hooks
  4. D.Effect cleanup

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.Effect cleanup — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
  2. B.Effect cleanup — a hook returning a stateful value and a setter that triggers a re-render when called
  3. C.Effect cleanup — the function returned from useEffect, run before the next effect and on unmount
  4. 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
  1. A.hooks must be called at the top level in the same order every render, only from React functions
  2. B.like useEffect but fires synchronously after DOM mutations and before the browser paints
  3. C.a hook returning a stateful value and a setter that triggers a re-render when called
  4. 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
  1. A.Dependency array
  2. B.Effect cleanup
  3. C.Rules of Hooks
  4. D.useState

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.Dependency array — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
  2. B.Dependency array — the function returned from useEffect, run before the next effect and on unmount
  3. C.Dependency array — hooks must be called at the top level in the same order every render, only from React functions
  4. 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
  1. A.hooks must be called at the top level in the same order every render, only from React functions
  2. B.a hook returning a stateful value and a setter that triggers a re-render when called
  3. C.the function returned from useEffect, run before the next effect and on unmount
  4. 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
  1. A.Rules of Hooks
  2. B.Effect cleanup
  3. C.useState
  4. D.Dependency array

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.Rules of Hooks — the function returned from useEffect, run before the next effect and on unmount
  2. B.Rules of Hooks — hooks must be called at the top level in the same order every render, only from React functions
  3. C.Rules of Hooks — like useEffect but fires synchronously after DOM mutations and before the browser paints
  4. 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
  1. A.like useEffect but fires synchronously after DOM mutations and before the browser paints
  2. B.a hook that runs side effects after render and re-runs when its dependency array changes
  3. C.the function returned from useEffect, run before the next effect and on unmount
  4. 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
  1. A.Dependency array
  2. B.useLayoutEffect
  3. C.Effect cleanup
  4. D.useEffect

Answer + AI explanation with Pro

18. Which statement is correct?

Senior
  1. A.useLayoutEffect — useEffect's second argument controlling when it re-runs; an empty [] runs it once after mount
  2. B.useLayoutEffect — like useEffect but fires synchronously after DOM mutations and before the browser paints
  3. C.useLayoutEffect — a hook that runs side effects after render and re-runs when its dependency array changes
  4. 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.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers