4 ms·
I've built my latest project[1] with Next.js and it's often felt pretty hectic to use. App vs. pages router, accessing cookies requiring different APIs between
by dom96 2y ago
I've built my latest project[1] with Next.js and it's often felt pretty hectic to use.
App vs. pages router, accessing cookies requiring different APIs between the client-side and the server side, env vars being accessed via `process.env.NEXT_PUBLIC_*` which gets rewritten into literal value of the env var (so if you access `process.env` directly you're very confused).
I guess I was hoping that I'd be able to write code which would work on either the client-side or the server-side with minimal changes. But that's not what I experienced. For what Next.js does provide, it doesn't feel worth the overhead and the learning required to do it "the Next.js way".
1 - https://onlyhumanhub.com https://onlyhumanhub.com
- 383toast 2y agoTotally agree, Next.js has so much Next-specific stuff (which also changes frequently) that I don't use it anymore.
- matt-p 2y agoThe app router is complete hell and was dog slow when it was launched as "stable/new default". Use pages and remember that env var patten and you're good.
- dom96 2y agoPages is the old thing, why would I use it? Isn't it basically deprecated by now?
- vunderba 2y agoIt might be the old thing but it's still widely supported by Next - in no small part due to the backlash over the IMHO way overengineered App Router. I still use the pages system and actually find myself increasingly moving back to just using Vite + React if I don't need access to the node-based API.
- matt-p 2y agoAgree Vite/react is a great choice too.
- matt-p 2y agoBecause it works better?