# try-react-hooks **Repository Path**: shrekuu/try-react-hooks ## Basic Information - **Project Name**: try-react-hooks - **Description**: React Hooks 与带上各种辅助的写法 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-21 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Try React Hooks > React Hooks 与带上各种辅助的写法 ## 跑起来看看效果 ```bash # 安装依赖 yarn install # 跑起来, 自动在浏览器打开 npm start ``` ## 各种写法 - 无 react-hooks 风格写法 [CounterWithoutHooks.js](src/CounterWithoutHooks.js) - react-hooks 风格写法 [CounterWithHooks.js](src/CounterWithHooks.js) - unstated-next 风格写法 [CounterWithUnstatedNext.js](src/CounterWithUnstatedNext.js) - constate 风格写法 [CounterWithConstate.js](src/CounterWithConstate.js) ## 参考 [React Hooks](https://zh-hans.reactjs.org/docs/hooks-intro.html) [Unstated Next](https://github.com/jamiebuilds/unstated-next) [Constate](https://github.com/diegohaz/constate)