# Screen crashes the whole app: Rendered more hooks than during the previous render

> A useMemo was added below the if (isLoading) return / if (error) return early returns.

Web page: https://davidewins.com/errors/rules-of-hooks-usememo-after-early-return

React Native. Confirmed fix, 11 September 2026.

Versions: React 19

Error:

```
Rendered more hooks than during the previous render
```

## Cause

A useMemo was added below the `if (isLoading) return` / `if (error) return` early returns. The loading render called 6 hooks, the data render 7. tsc does not catch this.

## Fix

Move every hook above the early returns. Run eslint-plugin-react-hooks (`react-hooks/rules-of-hooks: error`) before shipping any edit that adds or moves a hook. If it is already in production, roll back first:
```bash
eas update:roll-back-to-embedded --branch production --runtime-version <v> --platform ios
```

## More React Native errors

- [Feed shows an error state for every address: ReferenceError before initialization](https://davidewins.com/errors/tdz-const-used-in-map-before-declaration)
- [Screen crash: Maximum update depth exceeded](https://davidewins.com/errors/maximum-update-depth-competing-effects)
- [Reanimated crash on device: Tried to synchronously call a non-worklet function on the UI thread](https://davidewins.com/errors/worklet-calls-non-worklet-helper)
- [Rows wrapped in <Link asChild> collapse to a tiny height](https://davidewins.com/errors/link-aschild-function-style-dropped)
- [Pressable buttons render invisible: style function fill never applied](https://davidewins.com/errors/uniwind-pressable-double-wrap-drops-style)

[Search all errors](https://davidewins.com/errors)
