You Can’t Use Hooks Conditionally… or Can You?
watch on portal.gitnation.org ↗https://portal.gitnation.org/contents/you-cant-use-hooks-conditionally-or-can-yousummary
Explains why the Hooks rule “only call hooks at the top level” doesn’t uniformly apply, showing that useContext can be used conditionally. Compares useContext with other hooks by building a mental model of React’s runtime tracking of props, state, refs and context values to explain how React manages rendering and data association.
AI-written summary · about
related talks
27mHooked on React Hooks
17mReact hooks: the good, the bad and the ugly
31mWhy we’ll all use React Hooks
36mReusing Stateful Logic in React: HOC vs Render Props vs Hooks
45mWhy I am hooked on the future of React
44museLess
29mCustom Hooks in React: The Ultimate UI Abstraction Layer
35mA Guided Tour of React Hooks