At master 7926b28, useState(new Array(...)) and useRef(new Animated.Value(...)) eagerly evaluate their arguments every render. A real React 19 renderer with 10 updates constructs 33 Animated.Values although only the original three are used. Every scroll progress update also rebuilds the initial page list. Proposed fix: lazy state initialization for these mount-only resources, preserving stable handlers and the existing pagesAmount initialization-only behavior. The example navigation hook repeats the allocation pattern and has an independently stale selection callback. Diagnostics are external, not added test files. This source audit is AI-assisted.
At master 7926b28, useState(new Array(...)) and useRef(new Animated.Value(...)) eagerly evaluate their arguments every render. A real React 19 renderer with 10 updates constructs 33 Animated.Values although only the original three are used. Every scroll progress update also rebuilds the initial page list. Proposed fix: lazy state initialization for these mount-only resources, preserving stable handlers and the existing pagesAmount initialization-only behavior. The example navigation hook repeats the allocation pattern and has an independently stale selection callback. Diagnostics are external, not added test files. This source audit is AI-assisted.