JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 258
  • Score
    100M100P100Q93164F
  • License MIT

usePreviousDifferent hooks returns the last different value of a variable

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

TitleCard

Build Status

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/>)