Search code examples
javascriptreactjsnext.jsnext.js13sitemap

What is the correct usage of next.js app and pages directories?


I'm working on next.js 13 project which uses /pages directory instead of /app, I just added app directory to use its new features for dynamic sitemap rendering and only for that

is this acceptable practice ? example example usage


Solution

  • According to the next docs, using app router alongside pages router is possible (for backward compatibility purposes) but you better use one router only.