App vs Page router: When to use either?
Unanswered
Giant Schnauzer posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Giant SchnauzerOP
I know the App router is a relatively new feature. I'm curious, if you were building a web app from the ground up, what scenarios would lend themselves to using the App router vs the Page router? Or is the app router the best way to go for all scenarios?
8 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
American black bear
i'm confused to choose which one to use for SSG, because i don't intend to use next.js for SSR
![Avatar](https://cdn.discordapp.com/avatars/184479429404262410/a_35db4fb943e84d39bb02d6ec0f1d0b7e.gif?size=256)
DirtyCajunRice | AppDir
pages is deprecated. no new features. so app dir is always the suggestion
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
American black bear
does it affect with src ? when
isnt the
npx create-next-apps
i opted yes for src folder, and it's now i have src/app/page.tsx
which is i think weirdisnt the
/src
supposed to be root folder ?![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Tramp ant
yeah its okay
it was set up for you so it should work fine. if youre using tailwind you might need to update content paths
src is just to keep your code separated from configuration files. In it you can have directories for components, hooks, libs, translation and pretty much anything
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
American black bear
how to make the imported style global ? currently i have
/app/layout.tsx
and /app/page.tsx
.. But not sure which one is the entry point / maiin index.tsx since the guide discourage to override the _app.tsx
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
app dir: import the css file to
pages dir: import the css file to
app/layout.tsx
pages dir: import the css file to
pages/_app.tsx