Back to the Catalog
react
react-19
rendering
effects
suspense
server-components

React: When Does This Re-render?

32 questions

Thirty-two code-driven questions about render snapshots, Effect synchronization, identity, memoization, refs, React 19 Server and Client Components, use(), and Suspense. Assume React 19.2 semantics and the environment stated in each Question.

Questions

  1. Not answered. What gets logged when this component first mounts in root-level Strict Mode?
  2. Not answered. What changes when Strict Mode wraps only part of the app?
  3. Not answered. After one click, what count is committed, and how many times can the updater log?
  4. Not answered. After increment changes to 5, what values does the interval keep using?
  5. Not answered. When roomId changes, what runs first?
  6. Not answered. How many times does this component render during its initial production mount?
  7. Not answered. What is the simplest way to remove the extra render?
  8. Not answered. After one click, what does the timeout log?
  9. Not answered. Starting from number = 0, what appears after this click?
  10. Not answered. Starting from number = 0, what value does this update queue produce?
  11. Not answered. What happens when state is set to the same primitive value?
  12. Not answered. Does the child render when only the parent's local state changes?
  13. Not answered. Why does this memoized child still render after every parent update?
  14. Not answered. What is the clearest default for this unmeasured useMemo?
  15. Not answered. Which useMemo assumptions are unsafe?
  16. Not answered. What problem does Strict Mode make easier to spot here?
  17. Not answered. Where should an interval ID usually live?
  18. Not answered. Why is this ref-backed counter broken?
  19. Not answered. After row A is deleted, where can hello appear?
  20. Not answered. Why can key={Math.random()} erase an input after every parent render?
  21. Not answered. What happens to ProfileForm state when userId changes?
  22. Not answered. What does Row receive as props.key?
  23. Not answered. How should a Server Component add an interactive toggle?
  24. Not answered. What does the 'use server' directive mark?
  25. Not answered. Which props can cross from a Server Component to a Client Component?
  26. Not answered. Does every file in a client-side subtree need 'use client'?
  27. Not answered. What happens when a component calls use(resourcePromise)?
  28. Not answered. Where may React's use API be called?
  29. Not answered. Why is creating this Promise during every Client Component render a bug?
  30. Not answered. Will this Effect activate the surrounding Suspense fallback?
  31. Not answered. Does React keep state from a render that suspends before its first mount?
  32. Not answered. How can navigation keep visible content from flashing back to a Suspense fallback?