Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brandonheyer/f0e0607b90c26faad425a31de2e0ef55 to your computer and use it in GitHub Desktop.
Save brandonheyer/f0e0607b90c26faad425a31de2e0ef55 to your computer and use it in GitHub Desktop.
componentWillReceiveProps debug
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