Files
Nitro-V3/src/layout
simoleo89 5697d169ee Fix rules-of-hooks violation in InfiniteGrid
InfiniteGridRoot called useVirtualizer + 2 useEffect after an early
return for the squareItems branch, which violates the rules of hooks
(react-hooks v7 now flags this as an error and react-compiler skips
the component entirely).

Split the component into three:

- useColumnMeasure: shared custom hook that owns parentRef +
  ResizeObserver-based column measurement (used by both branches).
- InfiniteGridSquare: the non-virtualized grid for squareItems mode.
  Doesn't call useVirtualizer.
- InfiniteGridVirtualized: the virtualized branch with TanStack
  Virtual + scroll/padding effects.

InfiniteGridRoot becomes a thin selector that routes by props.squareItems.
All hooks in each sub-component are now unconditional.

The remaining lint findings on this file (set-state-in-effect inside
InfiniteGridItem, react-hooks/incompatible-library on useVirtualizer)
are pre-existing/informational and out of scope.

https://claude.ai/code/session_01GrR87LAqnAEyKG2ZbmQt5Q
2026-05-11 16:31:51 +00:00
..
🆙 Init V3
2026-01-31 09:10:52 +01:00
🆙 Init V3
2026-01-31 09:10:52 +01:00
🆙 Init V3
2026-01-31 09:10:52 +01:00
🆙 Init V3
2026-01-31 09:10:52 +01:00