# react-tiny-store **Repository Path**: yansen_zh/react-tiny-store ## Basic Information - **Project Name**: react-tiny-store - **Description**: react-tiny-store 是一种在中小 React 项目中使用的 store 管理工具 - **Primary Language**: JavaScript - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: https://yansen_zh.gitee.io/react-tiny-store-doc/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-26 - **Last Updated**: 2024-05-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @zjxpcyc/react-tiny-store 极简 `react` `store` 管理工具 . 此版本(v4)属于 `break change` ,不兼容老版本 (v3) 。老版本 (v3) 的 使用的说明,[请点击查询](./README.v3.md)。 ## 安装 ```bash npm install @zjxpcyc/react-tiny-store -S ``` ## 使用 ```javascript // store.js import { create } from '@zjxpcyc/react-tiny-store'; const useCount = create(1); export default useCount; // 至此 store 定义结束 // 可以在任意的组件内使用这个 useCount hook // app.jsx import useCount from './store'; const App = () => { const [count, setCount] = useCount(); return ( ); } ``` 更多方式,请查询[说明文档](https://yansen_zh.gitee.io/react-tiny-store-doc/)