The current example useNavigationPanel memoizes onPageSelected with empty dependencies, so replacing onPageSelectedCallback still invokes the old callback. A real React 19 harness reproduces this, and five updates allocate 18 Animated.Values instead of retaining three. Proposed fix: lazy initialization, complete stable handler dependencies and an optional no-op callback without a fresh default function. The public hook has a separately tracked allocation fix in #1107. This source audit is AI-assisted.
The current example useNavigationPanel memoizes onPageSelected with empty dependencies, so replacing onPageSelectedCallback still invokes the old callback. A real React 19 harness reproduces this, and five updates allocate 18 Animated.Values instead of retaining three. Proposed fix: lazy initialization, complete stable handler dependencies and an optional no-op callback without a fresh default function. The public hook has a separately tracked allocation fix in #1107. This source audit is AI-assisted.