Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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