nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 181 forks source link

Add Stack replacement to `replace()` #241

Closed nandorojo closed 2 years ago

nandorojo commented 2 years ago

Second attempt at #70.

Released in 1.1.2.

Also available in version 2.0.0-canary.4.

yarn add solito@next13

With useRouter:

router.replace('/', undefined, {
  experimental: {
    nativeBehavior: 'stack-replace',
    isNestedNavigator: true
  }
})

And with Link:

<Link
  replace
  experimental={{ nativeBehavior: 'stack-replace', isNestedNavigator: true }}
/>
vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
solito-s9oj ✅ Ready (Inspect) Visit Preview Nov 21, 2022 at 3:16PM (UTC)
with-custom-fonts ✅ Ready (Inspect) Visit Preview Nov 21, 2022 at 3:16PM (UTC)
2 Ignored Deployments | Name | Status | Preview | Updated | | :--- | :----- | :------ | :------ | | **solito** | ⬜️ Ignored ([Inspect](https://vercel.com/fernandorojo/solito/Fg6xR8ehjvBUmNsvPC8MX3dSi2WQ)) | | Nov 21, 2022 at 3:16PM (UTC) | | **solito-app** | ⬜️ Ignored ([Inspect](https://vercel.com/fernandorojo/solito-app/EQL7Eym3mqaWZwpUgx95uD5YZefc)) | | Nov 21, 2022 at 3:16PM (UTC) |