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

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

Web page: https://davidewins.com/errors/expo-router-setparams-wrong-screen

Expo. Likely fix, 7 October 2026.

Versions: 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

- [Dev client red screen: No script URL provided (launcher never appears)](https://davidewins.com/errors/expo-dev-client-no-script-url-precompiled)
- [Bundle fails with Invalid expression encountered after supabase-js update](https://davidewins.com/errors/supabase-js-hermes-invalid-expression)
- [After upgrading to SDK 57, expo-font / expo-image / expo-asset config is missing](https://davidewins.com/errors/expo-sdk57-plugins-must-be-declared)
- [SDK upgrade: export dies with SyntaxError after expo install --fix](https://davidewins.com/errors/expo-install-fix-leaves-babel-preset-stale)
- [expo-doctor wants TypeScript 6 but tsc reports hundreds of errors](https://davidewins.com/errors/typescript-6-explodes-typecheck-expo)

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