3 ms·
In fact it's quite opposite. App directory has lot of quirks that I learnt building in it after experience in react. Just after using it for two weeks I found t
by YetAnotherNick 3y ago
In fact it's quite opposite. App directory has lot of quirks that I learnt building in it after experience in react. Just after using it for two weeks I found there is no global 404, you can't use things like window and document, server components are close to useless where you can't even read cookies in server component(you can't read it in client component in server as well even though next has it), it's better to stay away of API routes, you can't use environment variables in prod but you could use in dev, you could easily trip yourself by using 'next/router' instead of 'next/navigation' etc.
- presentation 3y agoDoes this not work? https://nextjs.org/docs/app/api-reference/functions/cookies https://nextjs.org/docs/app/api-reference/functions/cookies
- YetAnotherNick 3y agoSorry, yes I think I tried that in client component and failed to use it in prerendering step or something(I could still be totally wrong, as I said I just spent 2 weeks in next app directory)
- solardev 3y agoCan you just mix and match the app router and the page router? I'm not actually sure what the value of the app router is, but the page router works well and is more mature.