Comments (6)
hey! the library is supposed to only be used in dev.
the code
if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
// ...
}
makes sure that it doesn't affect the production code.
from why-did-you-render.
@vzaidman
Just checked - same for prod - WDYR itself does not called, but the code is there, and lodash is there, and override is there.
With all process.env.NODE_ENV === 'development'
checks.
from why-did-you-render.
Gotcha. I'll make sure there's no window._
override and revise the guidelines not to include the line importSource: '@welldone-software/why-did-you-render'
in process.env.NODE_ENV === 'development'
.
I'd also try to find a way to compile the library as an empty file with console.error
or something if the app is included in prod. The library should not be included in prod in any capacity.
from why-did-you-render.
@vzaidman It still corrupts results on dev for me. Some parts of app does not work when window._
is overridden.
Also, when it is switched off it is still ends up in the source code (and imports lodash) because of importSource: '@welldone-software/why-did-you-render',
I guess.
from why-did-you-render.
Related Issues (20)
- Problem: React has detected a change in the order of Hooks called by BrowserRouter HOT 4
- how to config why-did-you-render with "ejected" create-react-app
- Stopped working HOT 10
- What do the colors mean? HOT 3
- WDYR does not show reason for render HOT 2
- Typing error on React.memo? HOT 2
- Integration with Next.js 13 app folder? HOT 1
- Issues with Parcel? HOT 3
- use React.lazy warp function, wdyr not work.
- Is it possible to print testID along side Component name on wdyr logs? HOT 1
- use jotai always diff
- dom npm
- wdyr not work in next13 (repo provided) HOT 2
- wdyr not work in next13 (repo provided)
- Cannot get WDYR output from nextjs dynamically loaded component (e.g. for no-ssr use case) HOT 2
- Project still being actively maintained? HOT 2
- Multiple React roots
- why-did-you-render + React Query
- No logs or anything about WDYR HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from why-did-you-render.