> For the complete documentation index, see [llms.txt](https://sherferyu.gitbook.io/storact/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sherferyu.gitbook.io/storact/master.md).

# 简介

### 对比

相对redux，做出了以下修改

1. 使用react-hooks，通过use的方式代替'mapStateToProps'和'mapDispatchToProps'
2. 去掉声明式的action，dispatch通过调用属性方法的方式触发action
3. 不再直接获取store的状态，改为通过调用getter的方式获取
4. 固化基础的reducer，减少基础操作的编写
5. 参考dva，增加effects
6. 增加dispatch的配置，使其拥有延迟触发、防抖节流、异步挂起的功能
7. 参考dva，去掉"单一数据源"的概念，改为多数据源，并真正实现各个数据源隔离
8. 中间件改成类似koa的洋葱模式，并改成async方法

### 示例

代码：/dome/src/

```
git clone https://github.com/LylaYuKakola/storact.git
npm intall
npm start
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sherferyu.gitbook.io/storact/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
