mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 17:31:06 +08:00
The PR reworks history integration to better integrate with browser's history stack and supports nested navigation more reliably: - On each navigation, save the navigation in memory and use it to reset the state when user presses back/forward - Improve heuristic to determine if we should do a push, replace or back This closes #8230, closes #8284 and closes #8344
8 lines
262 B
TypeScript
8 lines
262 B
TypeScript
/**
|
|
* Compare two arrays with primitive values as the content.
|
|
* We need to make sure that both values and order match.
|
|
*/
|
|
export default function isArrayEqual(a: any[], b: any[]) {
|
|
return a.length === b.length && a.every((it, index) => it === b[index]);
|
|
}
|