Package Exports
- @rooks/use-previous-different
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rooks/use-previous-different) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@rooks/use-previous-different
About
usePreviousDifferent returns the last different value of a variable
Installation
npm install --save @rooks/use-previous-different
Importing the hook
import usePreviousDifferent from "@rooks/use-previous-different"
Usage
function Demo() {
const [value, setValue] = useState(0)
const previousValue = usePreviousDifferent(value)
return null
}
render(<Demo/>)