Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/umijs/hox
State sharing for React components.
https://github.com/umijs/hox
react react-hooks reactjs state-management
Last synced: 7 days ago
JSON representation
State sharing for React components.
- Host: GitHub
- URL: https://github.com/umijs/hox
- Owner: umijs
- License: mit
- Created: 2019-10-16T06:16:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T16:11:06.000Z (10 months ago)
- Last Synced: 2025-01-12T00:05:58.355Z (14 days ago)
- Topics: react, react-hooks, reactjs, state-management
- Language: TypeScript
- Homepage: https://hox.js.org
- Size: 2.93 MB
- Stars: 1,459
- Watchers: 30
- Forks: 98
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-state - hox - generation state manager for React. (react)
- awesome - umijs/hox - generation state manager for React. (React / State Management)
- awesome-react-cn - hox
README
# Hox
State sharing for React components.
[![npm version](https://img.shields.io/npm/v/hox.svg?logo=npm)](https://www.npmjs.com/package/hox)
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/hox.svg?logo=javascript)](https://www.npmjs.com/package/hox)
![React](https://img.shields.io/npm/dependency-version/hox/peer/react?logo=react)[English Doc](https://hox.js.org) · [中文文档](https://hox.js.org/zh/)
> This is the documentation for hox v2. If you are looking for the v1 doc, please go [here](https://github.com/umijs/hox/blob/v1/README.md).
## Play Hox in Codesandbox
[![Edit](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/awmleer/todo-app-with-hox/tree/master/)
## Install
```shell
npm install --save hox
# or
yarn add hox
# or
pnpm add hox
```## Why Hox?
- Direct reuse of existing React knowledge, almost no learning cost, how you write React components, you can write Store
- Designed for flexible refactoring, using the same DSL in Store and components allows you to convert a component's local state into a state shared between components at almost zero cost
- Supports both local and global states, a good balance between flexibility and simplicity
- Excellent performance and TypeScript support