globalstate-hooks
TypeScript icon, indicating that this package has built-in type declarations

0.1.14 • Public • Published

GlobalState hooks

Usage

import { useRestReducer } from "globalstate-hooks"

type Pet = {
  name: string
  type: "dog" | "cat"
}

const [state, { index, create, update, read, del, clear, updatePartial }] = useRestReducer<Pet>({
  api: {
    domain: "http://localhost/",
    name: "pets"
  }
})

index()

Readme

Keywords

none

Package Sidebar

Install

npm i globalstate-hooks

Weekly Downloads

18

Version

0.1.14

License

ISC

Unpacked Size

198 kB

Total Files

128

Last publish

Collaborators

  • gilleswittenberg