mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-13 17:47:32 +08:00
refactor: rehydrate only once
This commit is contained in:
@@ -91,7 +91,7 @@ function StackRouter(options: DefaultRouterOptions) {
|
||||
};
|
||||
},
|
||||
|
||||
getRehydratedState({ key, routeNames, partialState }) {
|
||||
getRehydratedState({ routeNames, partialState }) {
|
||||
let state = partialState;
|
||||
|
||||
if (state.stale) {
|
||||
@@ -99,7 +99,7 @@ function StackRouter(options: DefaultRouterOptions) {
|
||||
...state,
|
||||
stale: false,
|
||||
routeNames,
|
||||
key,
|
||||
key: `stack-${shortid()}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user