Sitemap
Coding-Practice

Coding-Practice

Apr 17, 2026
  1. Explain about Hooks in react ?
  2. Life cycle methods ?
  3. functional vs class based components
  4. Performance optimazation techniques in react ?
  5. debouncing and throttling in react ?
  6. Explain about Virtual DOM ?
  7. Diffing and reconcilition in react ?
  8. What will happen if you call react hook in functional component other than at top of the function ?

Get Coding-Practice’s stories in your inbox

Join Medium for free to get updates from this writer.

Calling React hooks in the middle of a functional component, inside loops, conditions, or nested functions violates the core rules of React. Doing so causes React to lose track of which state or effect belongs to which call, resulting in unpredictable bugs, incorrect UI rendering, or application crashes.React relies on the exact order in which hooks are called on every render to map them to their internal state. If you break this order by conditionally skipping a hook, all subsequent hooks shift, causing React to read the wrong data.