Skip to content

gilleswittenberg/globalstate-hooks

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published