Feed shows an error state for every address: ReferenceError before initialization
React NativeConfirmed fix
TypeScript 5.9
Error
ReferenceError: Cannot access 'scoreById' before initializationCause
A .map() callback read a const declared a few lines further down. With an empty array the callback never runs, so tests and CI passed; with one item it threw inside the react-query queryFn and the screen showed its error state. TypeScript does not flag use-before-declaration inside a nested closure.
Fix
Move the declaration above its first use. Add a test with at least one item, not only an empty list.
More React Native errors
- Screen crashes the whole app: Rendered more hooks than during the previous renderRendered more hooks than during the previous render
- Screen crash: Maximum update depth exceededError: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate.
- Reanimated crash on device: Tried to synchronously call a non-worklet function on the UI thread[Worklets] Tried to synchronously call a non-worklet function `clamp01` on the UI thread.
- Rows wrapped in <Link asChild> collapse to a tiny height
- Pressable buttons render invisible: style function fill never applied