App vs Page router: When to use either?
Unanswered
Giant Schnauzer posted this in #help-forum

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

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

pages is deprecated. no new features. so app dir is always the suggestion

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 ?
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

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

@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`

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