Skip to content

Instantly share code, notes, and snippets.

View PabloLION's full-sized avatar
🔍
Looking for half-time job

Pablo LION PabloLION

🔍
Looking for half-time job
  • Barcelona, Spain
View GitHub Profile
@PabloLION
PabloLION / propdiff.js
Last active November 26, 2021 20:36 — forked from albertorestifo/propdiff.js
Logs change with git diff style between current and previous object
// Example usage for React class component.
// Can also it for state or non-react JS.
componentDidUpdate(prevProps) {
logUpdatedDiff(prevProps, this.props)
}
/**
* @param {object} prev: previous to compare
* @param {object} current: current to compare
* @return {void}