diff --git a/packages/vscode-extension/lib/expo_router_plugin.js b/packages/vscode-extension/lib/expo_router_plugin.js index 71bfae09b..0a5427f58 100644 --- a/packages/vscode-extension/lib/expo_router_plugin.js +++ b/packages/vscode-extension/lib/expo_router_plugin.js @@ -35,7 +35,8 @@ function useRouterPluginMainHook({ onNavigationChange }) { }; }, requestNavigationChange: ({ pathname, params }) => { - router.push(pathname, params); + router.navigate(pathname); + router.setParams(params); }, }; } diff --git a/packages/vscode-extension/lib/expo_router_v2_plugin.js b/packages/vscode-extension/lib/expo_router_v2_plugin.js index 88a418755..3bfe88943 100644 --- a/packages/vscode-extension/lib/expo_router_v2_plugin.js +++ b/packages/vscode-extension/lib/expo_router_v2_plugin.js @@ -35,7 +35,8 @@ function useRouterPluginMainHook({ onNavigationChange }) { }; }, requestNavigationChange: ({ pathname, params }) => { - router.push(pathname, params); + router.navigate(pathname); + router.setParams(params); }, }; }