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 Jan 31, 2023
1 parent fb5105b commit 79d8dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/native/src/useLinking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,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 79d8dc1

Please sign in to comment.