@use-rematch/use
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@use-rematch/use

useful recipes

npm

install

pnpm i @use-rematch/use

usage

basic

simple reducer model with basic set & update reducer.

import useStore from '@use-rematch/use/basic'

const { state, dispatch } = useStore({ dolphin: 1 })

// overwrite set
// from { dolphin: 1 } to { zoo: 1 }
dispatch.set({ zoo: 1 })

// partial update
// from { zoo: 1 } to { dolphin: 1, zoo: 1 }
dispatch.update({ dolphin: 1 })

Readme

Keywords

none

Package Sidebar

Install

npm i @use-rematch/use

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

49.7 kB

Total Files

18

Last publish

Collaborators

  • qidanta