Skip to content

1.1.2: Stack replace()

Compare
Choose a tag to compare
@nandorojo nandorojo released this 21 Nov 15:19
· 370 commits to master since this release
87f5de8

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