Comments (10)
@parties I dont have it here where I updated react-redux and redux:
https://codesandbox.io/s/whydidyourender-false-positive-demo-pjkn7
These older versions didn't handle state changes as well as the last version.
I strongly suggest using the last one.
from why-did-you-render.
it probably has to do with react-navigation indeed because i don't see any reason why it's state changes. you does't even use it.
just to make it clear, your component doesn't look like it re-renders with the same props, the state it warns about is the this.state
of SyncView
, not the redux state.
I didn't work with react native for a long time so i'm not sure I can help you by myself.
but lets try some things:
- what version of react do you use?
- what version of the library do you use?
- can you try the same by changing props through a father and not redux?
also in your example you wrap MyComp
. is it a typo? do you need to edit it to be SyncView
?
from why-did-you-render.
from why-did-you-render.
- "react": "16.5.2",
- "@welldone-software/why-did-you-render": "^2.5.2"
- I couldn't try as it's no longer set up in the same way, but It's worked before.
Yeah it was a typo
from why-did-you-render.
ok. so you can't reproduce it anymore?
from why-did-you-render.
As in I don't have why-did-you-render set up anymore. I only added it temporarily to test several tools to help improve performance of the app.
from why-did-you-render.
ok thanks. if you wish to try again with me you are welcome to reopen the issue.
from why-did-you-render.
I am seeing this issue myself when using connect
in a simple Todo app.
(I think) I have made a working demo replicating this bug; it appears to be showing a false positive about a different state object for a component that doesn't use state at all.
Demo here: https://codesandbox.io/s/1j4qc
from why-did-you-render.
Ah ha, interesting.
I had those packages set to the older versions since those are the current versions of the application I'm currently working on (large app, not a trivial upgrade).
Thank you for taking a look, @vzaidman.
from why-did-you-render.
Updating Redux fixed this issue for me
from why-did-you-render.
Related Issues (20)
- use jotai always diff
- dom npm
- wdyr not work in next13 (repo provided) HOT 2
- wdyr not work in next13 (repo provided)
- WDYR includes full lodash library with window._ override HOT 6
- 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
- Missing `ownerDataMap` in `notifier`
- Partially Working with React 18 + NextJS 13
- "Support for defaultProps will be removed" error after setting include: [/./] option HOT 2
- Tracking custom hooks issue HOT 2
- WhyDidYouRender is not working in Storybook.js
- Property 'React' doesn't exist HOT 1
- react-refresh-webpack-plugin not updating component when wrapped with React.memo.
- `trackAllPureComponents: true` is not working
- Next.js example is missing
- Links from the Credits section are broken HOT 1
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.