app router vs pages router?
Answered
Havana posted this in #help-forum
HavanaOP
i wouldn't have created a help-forum post about a small question like this but there's no other way ¯\_(ツ)_/¯
I need to create a simple page (only one page). It's going to have no api calls, just a simple page with gsap animations and maybe threejs. Should i pick app router or pages? I don't like how the app router wants me to put fonts in src/app and images in public.
I need to create a simple page (only one page). It's going to have no api calls, just a simple page with gsap animations and maybe threejs. Should i pick app router or pages? I don't like how the app router wants me to put fonts in src/app and images in public.
Answered by B33fb0n3
I guess the most suited framework for that would be a frontend-only framework (like react). Because as you said: you don't need api call, it's a one pager, you have clientside animation (gsap) and clientside 3d rendering (threejs).
So if you ask me what you should use, I would say: use react.
So if you ask me what you should use, I would say: use react.
9 Replies
I guess the most suited framework for that would be a frontend-only framework (like react). Because as you said: you don't need api call, it's a one pager, you have clientside animation (gsap) and clientside 3d rendering (threejs).
So if you ask me what you should use, I would say: use react.
So if you ask me what you should use, I would say: use react.
Answer
HavanaOP
What about the various optimizations from nextjs? Are they not worth it for such a simple case?
Can you give me example which optimizations from nextjs would help you on your page?
HavanaOP
Images, fonts, also everything written in here https://react.dev/learn/start-a-new-react-project#can-i-use-react-without-a-framework
although i guess since it won't grow they probably don't matter as much
i just want to make it as good as possible
well, as simple as it gets, try with pages router.
but, if you doesn't really need SSR. just use react + vite.
just to remind you, don't be like this.
only use something you need for your simple case.
but, if you doesn't really need SSR. just use react + vite.
just to remind you, don't be like this.
only use something you need for your simple case.
@Havana solved?
That's not the solution. I marked the correct one