False Positive
See original GitHub issueGetting warning: “Re-rendered because the state object itself changed but it’s values are all equal.” “This usually means this component called setState when no changes in it’s state actually occurred.” “more info at http://bit.ly/wdyr02” prev state: Object {} !== Object {} :next state
I added a console log of the props, and it can be seen that its only rendering once per prop change.
The component:
class MyComp extends PureComponent {
static whyDidYouRender = true;
render() {
console.log('rerendered', this.props.downloadProgress);
return (
<View/>
);
}
}
const mapStateToProps = state => ({
downloadProgress: getDownloadProgress(state),
});
export default connect(mapStateToProps)(MyComp);
Every time the prop changes causing a rerender I get the warning above that the warning is unnecessary, which is false.
It may also be worth noting that this component is opened/hosted via react-navigation.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:10
Top Results From Across the Web
False positives and false negatives - Wikipedia
These are the two kinds of errors in a binary test, in contrast to the two kinds of correct result (a true positive...
Read more >False Positive (2021) - IMDb
False Positive : Directed by John Lee. With Ilana Glazer, Justin Theroux, Gretchen Mol, Sabina Gadecki. As if getting pregnant weren't complicated enough, ......
Read more >False Positive - Rotten Tomatoes
Hindle (Pierce Brosnan). But after becoming pregnant with a healthy baby girl, Lucy begins to notice something sinister through Hindle's gleaming charm, and...
Read more >Definition of false-positive test result - National Cancer Institute
false -positive test result ... A test result that indicates that a person has a specific disease or condition when the person actually...
Read more >Watch False Positive Streaming Online | Hulu (Free Trial)
Alone Deep Water The Evil Next Door The Owners Fear of Rain Girl Held Shortcut The Free Fall Every Breath You Take Run....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
Updating Redux fixed this issue for me