David Ewins
Error library

router.setParams writes params onto the wrong screen after a tab switch

ExpoLikely fix

Expo SDK 57, expo-router 57.0.24

There is no error message for this one, only the symptom in the title.

Cause

router.setParams changes whichever screen is focused. A search bar clearing itself on tab switch wrote ?q= onto the other tab.

Fix

Use the screen's own navigation.setParams (from useNavigation()), which targets that screen.

More Expo errors

Search all errors