You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
next info doesn't work in yarn environments anymore?
Also tested under Fedora Workstation 33... not that it would matter.
Which example does this report relate to?
with-why-did-you-render
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Why Did You Render does nothing. No logs are added to the console on page load.
Expected Behavior
The console should be absolutely spammed with WDYR messages.
To Reproduce
With Example Repo
Clone or Download this Repository
cd into examples/why-did-you-render
Install deps yarn install
Run the app yarn run dev
Without Example Repo
Or, in your existing project, make the following changes;
src/components/content/Hero.tsx
// Should not even be required but still...Hero.whyDidYouRender=trueexportdefaultHero
src/pages/_app.tsx
import'wdyr'// ...
src/pages/index.tsx
// Should not even be required but still...IndexPage.whyDidYouRender=trueexportdefaultIndexPage
wdyr.ts
/** * WDYR (why-did-you-render) helps locate unnecessary re-renders. * Applied in development environment, on the frontend only. * * It will only log unnecessary re-renders, not expected re-renders. * * @see https://github.com/welldone-software/why-did-you-render * @see https://github.com/vercel/next.js/tree/canary/examples/with-why-did-you-render */importReactfrom'react'if(typeofwindow!=='undefined'&&process.env.NODE_ENV==='development'){// eslint-disable-next-line @typescript-eslint/no-var-requiresconstwhyDidYouRender=require('@welldone-software/why-did-you-render')// eslint-disable-next-line no-consoleconsole.debug('Applying whyDidYouRender, to help you locate unnecessary re-renders during development. See https://github.com/welldone-software/why-did-you-render')// See https://github.com/welldone-software/why-did-you-render#optionswhyDidYouRender(React,{trackAllPureComponents: true,trackHooks: true,logOwnerReasons: true,collapseGroups: true,})}
The text was updated successfully, but these errors were encountered:
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Not Applicable, doesn't work in Next 12 or 13.
next info
doesn't work in yarn environments anymore?Which example does this report relate to?
with-why-did-you-render
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Why Did You Render does nothing. No logs are added to the console on page load.
Expected Behavior
The console should be absolutely spammed with WDYR messages.
To Reproduce
With Example Repo
cd
intoexamples/why-did-you-render
yarn install
yarn run dev
Without Example Repo
Or, in your existing project, make the following changes;
src/components/content/Hero.tsx
src/pages/_app.tsx
src/pages/index.tsx
wdyr.ts
The text was updated successfully, but these errors were encountered: