0.1.2 • Published 4 years ago

globalstate-hooks-fork v0.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

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()
0.1.2

4 years ago