-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to app router #39
Convert to app router #39
Conversation
Adds LoginLinks component
create not-found
Wow is this really happening ?? that's really awsomm. This is the best, thx alot. We do need app router and combo with laravel is the best. |
Seems to work pretty well. A couple of questions:
Please mark as ready for review when answered. |
So here are the docs on the "@" sign- They are called parallel routes and I'm not actually sure if this is the best spot for them. - https://nextjs.org/docs/app/building-your-application/routing/parallel-routes When I imagine the 'dashboard' route I think of the user doing something like having a structure similar to this where posts would be nested in the dashboard route. Something like
In this case that
that would allow you to update the header section on each nested route like dashboard/posts in this instance. The other option is to just ditch the parallel routes and colocate a Dashboard component in the dashboard directory similar to the way I added the logo in the auth routes. Which would you prefer? (PS, I'm dropping the layout in the |
If I was building an app that had "posts", I'm not sure I would nest it under dashboard. I would imagine having |
In that case it might be fine the way it is |
Yeah what's odd about parallel routes is that they don't support nesting- Here is a discussion that talks about this limitation: vercel/next.js#48927 - In this case it would be nice to have the slot in the layout one level above the dashboard and then ideally you could override it in nested routes. But it currently requires the
Then /dashboard and /posts would both have the exact same @header- Perhaps in this case a wrapping component still makes more sense? |
I went ahead and simplified it by recreating the DashboardLayout component. Feel free to walk that commit back if you want to keep the other way of doing it! |
Alright I finally figured out how to do the Looks like you can do this-
where the root route has the reference to the header and the header names routes that are "parallel" to the ones that you create using the normal routing. Makes sense now that I get it. |
@allenjd3 Nice work. There is one thing we need to look into. How to prevent a flash on login page when say someone is visiting it from an authenticated area? Not sure how you would approach this with Next 14 and this Breeze starter kit. Any tips? |
I put in a possible solution to the flicker- I'm researching how to do this using the new Suspense api. I'll update this if I can figure it out! |
I think middlewares might be one way
Ali Gajani
Founder at Mr. Geek
www.mrgeek.me
www.aligajani.com
…On Sat, Dec 23, 2023 at 3:28 PM James Allen ***@***.***> wrote:
I put in a possible solution to the flicker- I'm researching how to do
this using the new Suspense api. I'll update this if I can figure it out!
—
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANGRWXXI6AWP6ZJRKREIG3YK32DHAVCNFSM6AAAAABAP5EWMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGMYTKNZUGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I got |
If you have something like lastpass enabled on the page it will inject divs that don't play well with nextjs in dev mode |
This updates the laravel/breeze-next starter to using the new App Router routing syntax. I am not a nextjs expert so it is very possible that I'm missing better ways to do this.
This also bumps the nextjs version to nextjs 14
Benefits to changing- App Router is the "new" way of doing routing in nextjs applications so this modernizes this starter kit.
Technically, the pages style routing is still valid so we could offer both types in separate branches or just convert to the new direction.