Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: rehydrate state before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Oct 18, 2019
1 parent a543f1b commit 3e92e22
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/useNavigationBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,13 @@ export default function useNavigationBuilder<
navigate(route.params.screen, route.params.params)
);

nextState = updatedState !== null ? updatedState : state;
nextState =
updatedState !== null
? router.getRehydratedState(updatedState, {
routeNames,
routeParamList,
})
: state;
}

if (state !== nextState) {
Expand Down

0 comments on commit 3e92e22

Please sign in to comment.