Skip to content

Instantly share code, notes, and snippets.

Pablo Ois Lagarde poislagarde

  • Buenos Aires, Argentina
Block or report user

Report or block poislagarde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View debug_component_update_snippet.js
componentWillUpdate (nextProps, nextState) {
const componentName = this.constructor.name
const { props, state } = this
const logUpdate = (location, key, value, nextValue) => {
console.groupCollapsed(`${componentName} - ${location}.${key} changed!`)
console.log('before: ', value[key])
console.log('after: ', nextValue[key])
console.groupEnd()
}
You can’t perform that action at this time.