Skip to content

Commit

Permalink
fix: don't modify browser history on re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Feb 17, 2023
1 parent 58b7cae commit ab66777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/native/src/useLinking.tsx
Expand Up @@ -411,7 +411,7 @@ export default function useLinking(
// This could happen since `history.go(n)` is asynchronous
// If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up
return ref.current?.addListener('state', series(onStateChange));
});
}, [enabled, history, ref]);

return {
getInitialState,
Expand Down

0 comments on commit ab66777

Please sign in to comment.