precoil:React的最小状态管理库

时间:2021-02-20 07:04:41
【文件属性】:
文件名称:precoil:React的最小状态管理库
文件大小:92KB
文件格式:ZIP
更新时间:2021-02-20 07:04:41
react hooks hook state-management preact 预卷 一个用于React的最小状态管理库。 特征 基于钩子的简约API 无需上下文提供者 小捆装 在上。 安装 npm install precoil 用法 原子 import { atom } from 'precoil' const textState = atom ( ) // textState: Atom const textStateWithDefault = atom ( '' ) // textStateWithDefault: Atom const textState = atom < string> ( ) // textState: Atom 原子使用状态 const textState = atom ( ) const Input = ( ) => { const [ text
【文件预览】:
precoil-main
----rollup.config.js(504B)
----package.json(2KB)
----__tests__()
--------index.test.tsx(5KB)
----.github()
--------workflows()
----jest.config.js(143B)
----LICENSE(1KB)
----src()
--------index.ts(4KB)
----.npmignore(78B)
----.eslintrc.js(77B)
----tsconfig.json(230B)
----.gitignore(2KB)
----README.md(3KB)
----yarn.lock(210KB)
----.editorconfig(130B)

网友评论