Downgrade app to pages router
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
I am trying to downgrade from app to pages. I only have one index page. I have tried renaming the app folder and adding a _app.js file but then it says 404. How can I downgrade?
6 Replies
Giant panda
Giant pandaOP
I've tried to create an index page but I am not sure what to put into it
I tried to copy from page.tsx but then the css and layout doesn't work
Giant panda
Well you can't just blindly copy everything over. Read the pages router docs from the beginning and pay attention to the
_app.tsx and _document.tsx files.Giant pandaOP
okay I've changed _app.tsx to:
import RootLayout from "./layout.tsx"
import './css/style.css'
export default function App({ Component, pageProps }) {
return <RootLayout><Component {...pageProps} /></RootLayout>;
}
but now I just get a hydration error
import RootLayout from "./layout.tsx"
import './css/style.css'
export default function App({ Component, pageProps }) {
return <RootLayout><Component {...pageProps} /></RootLayout>;
}
but now I just get a hydration error
seems to be loading correctly now atleast