1.1.2: Stack replace()
There is a new experimental feature to let you use React Navigation's stack replace action under the hood. It's been working well for me.
With useRouter
:
router.replace('/', undefined, {
experimental: {
nativeBehavior: 'stack-replace',
isNestedNavigator: true // this will likely be true
}
})
And with Link
:
<Link
replace
experimental={{ nativeBehavior: 'stack-replace', isNestedNavigator: true }}
/>
It's also available in version 2.0.0-canary.4
:
yarn add solito@next13