Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liammartens/nextjs-layout-reset-optional-catchall-example
https://github.com/liammartens/nextjs-layout-reset-optional-catchall-example
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/liammartens/nextjs-layout-reset-optional-catchall-example
- Owner: LiamMartens
- Created: 2023-04-07T14:08:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-07T14:20:44.000Z (over 1 year ago)
- Last Synced: 2024-10-18T16:13:56.848Z (2 months ago)
- Language: TypeScript
- Homepage: https://nextjs-layout-reset-optional-catchall-example.vercel.app
- Size: 94.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
This repo is meant to illustrate a potential issue with layouts and a optional catch all route.It appears the layout state is reset when navigating between routes, even though the paths fall within the same segment (`[[...path]]`).
To demo this issue:
- Run the project `yarn dev`
- Click the `Click me` button to toggle the nav state
- Navigate to another page using one of the links on the page.This does work when the layout is moved to the root itself.