Created
March 23, 2018 14:15
-
-
Save brandonheyer/f0e0607b90c26faad425a31de2e0ef55 to your computer and use it in GitHub Desktop.
componentWillReceiveProps debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let isFalse = false; | |
const mappedOutput = map(nextProps, (v, k) => { | |
const diff = this.props[k] === v; | |
isFalse = isFalse || !diff; | |
return [k, v, diff]; | |
}); | |
if (isFalse) { | |
console.log(mappedOutput); //eslint-disable-line | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment