Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/haydn/use-state-snapshots. A React hook to keep track of state changes for undo/redo functionality. codesandbox.io/s/use-state-snapshots-i6fuq
hooks react react-hooks
Something went wrong. Try again.
use-state-snapshots index.js.flow
346 B · 18 lines
at master
12345678910111213141516171819// @flow
declare module.exports: <T>( initial: T | (() => T), delay?: number | false, limit?: number) => [ T, (action: T | ((state: T) => T), force?: boolean) => void, number, (action: number | ((pointer: number) => number)) => void, Array<{ id: number, state: T, firstChange: number, lastChange: number }>];