Slide 66
Slide 66 text
https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberHooks.new.js
π€
const HooksDispatcherOnMount: Dispatcher = {
// ...
useRef: mountRef,
// ...
};
const HooksDispatcherOnUpdate: Dispatcher = {
// ...
useRef: updateRef,
// ...
};
const HooksDispatcherOnRerender: Dispatcher = {
// ...
useRef: updateRef,
// ...
};
const ContextOnlyDispatcher: Dispatcher = {
// ...
useRef: throwInvalidHookError,
// ...
};