Interview Q&A / React

INTERVIEW Q&A · 58 QUESTIONS

React interview questions

Rendering, state, hooks, keys and effects, explained with small examples.

  1. What does it mean for a React component to be pure?

    A pure component returns the same JSX for the same props, state and context, and changes nothing outside itself while rendering. Purity lets React re-run, skip or repeat renders safely, including in Strict Mode.

    IntermediateQuick answer1 min read