bisonapp
bisonapp copied to clipboard
feat: add persistent app layouts to template
trafficstars
Fix #242
Changes
Sets _app.tsx up to render a getLayout function for any page (or component) if it exists. This allows faster navigation between pages, since layouts that are the same between pages will not be re-rendered (since their element subtrees are the same).
References:
- Basic Features: Layouts | Next.js
- Persistent Layout Patterns in Next.js – Adam Wathan
- Next.js Page Layouts and Dynamic Content | Cut Into The Jamstack
Also includes:
- References shared footer component in logged in / logged out layouts
- Makes nav links consistently use
next/linkaround the ChakraLinkcomponent - Adds 3 placeholder pages for the default nav links
Screenshots
(prefer animated gif)
Checklist
- [ ] Requires dependency update?
- [ ] Generating a new app works
Fixes #xxx
We should revisit this PR with the new Layout features dropping
Almost a year old -- closing
😢
😢
Can re-open with new Next stuff