use-undoable-state
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

UseUndoableState

This is a simple hook for wrapping state in standard undo / redo behaviour.

Published on NPM Here

Installation

To install the package run either:

yarn add use-undoable-state

or

npm i use-undoable-state

Getting Started

Here is an example of how to use the hook:

const [ state, setState, undoState, redoState ] = useUndo()

After this it can be used like standard react state.

Dependencies (0)

    Dev Dependencies (16)

    Package Sidebar

    Install

    npm i use-undoable-state

    Weekly Downloads

    0

    Version

    1.0.3

    License

    GPL-3.0

    Unpacked Size

    40.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • l-heggerz