1.0.6 • Published 8 years ago
old-props v1.0.6
Decorator for ReactJS components that saves the old properties before it gets updated.
Installation
npm install --save old-props
Usage
import React, { Component } from 'react'
import oldProps from 'old-props'
@oldProps
class SomeComponent extends Component {
render() {
let previousProps = this.oldProps
let currentProps = this.props
// ...
}
}