David Ewins
Error library

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

React NativeConfirmed fix

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:

shell
eas update:roll-back-to-embedded --branch production --runtime-version <v> --platform ios

More React Native errors

Search all errors