Closed spmonahan closed 3 months ago
Changes the code to strictly follow the Rules of Hooks.
Previously the code conditionally called a hook which prevents React Compiler from making any potential optimizations. Now the conditional has been moved inside the hook.
However, this code is still potentially problematic as we are relying on useMemo() for correctness rather than as a performance optimization:
useMemo()
Depends on #565
✅ No changes found
Changes the code to strictly follow the Rules of Hooks.
Previously the code conditionally called a hook which prevents React Compiler from making any potential optimizations. Now the conditional has been moved inside the hook.
However, this code is still potentially problematic as we are relying on
useMemo()
for correctness rather than as a performance optimization:Depends on #565