1. What is useState ? Junior 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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account