Our great sponsors
-
why-did-you-render
why-did-you-render by Welldone Software monkey patches React to notify you about potentially avoidable re-renders. (Works with React Native as well.)
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I noticed while looking at the profiler the other day that all of our pages were rendering twice on initial load. Then saw that _app component was doing the same. Going backwards, I saw that rewrites in config were causing this. I was able to observe the same behavior on a brand new project, https://github.com/ardaerzin/nextjs-rewrite-test, I created with npx create-next-app. The moment I add rewrites, _app starts rendering twice.
Only on Build process or on the actual page ? And do you check rendering with https://github.com/welldone-software/why-did-you-render