3

I'm developing a NEXT JS project and can't find a solution for a twice rendering app!

Problem

After adding rewrites to next.config.js, App is rendered twice. If remove, rendred once.

next.config.js

async rewrites() {
  return [
    {
      source: '/about',
      destination: '/',
    },
  ]
},

_app.js

function MyApp() {
  console.log('App render');

  return (<></>);
}

export default MyApp

enter image description here enter image description here

1 Answer 1

2

this should be expected behavior-- as rewrites cause double renders in nextjs

6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.