Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
idootop committed Apr 21, 2024
1 parent 4b965e2 commit 0f050c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ If a component is computationally expensive to build, or if your state is a comp

If the state selector's return value remains unchanged, `XConsumer` will reuse the previous build result of the child component, reducing unnecessary re-renders and optimizing resource consumption.

<details>
<details open>
<summary>👉 Example</summary>

```typescript
Expand Down Expand Up @@ -406,4 +406,4 @@ function Increase() {

</details>

Note: By default, `XSta` does not automatically initialize or clean up global states. Instead, users decide when to initialize and destroy state values. Therefore, please be careful when using it to prevent issues like using an uninitialized state or memory leaks.
Note: By default, `XSta` does not automatically initialize or clean up global states. Instead, developers decide when to initialize and destroy state values. Therefore, please be careful when using it to prevent issues like using an uninitialized state or memory leaks.
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## ✨ 亮点

- **🐦 麻雀虽小,五脏俱全** 核心**不到 200 行代码**(包含换行和注释),提供了完备的 React 状态管理解决方案,生产环境可用。
- **🐦 麻雀虽小,五脏俱全** 核心不到 200 行代码(包含换行和注释),提供了完备的 React 状态管理解决方案,生产环境可用。
- **✅ 让 React 状态管理变简单** 与原生 `useState` Hook 一致的状态管理接口,会用 `useState` 就可以轻松搞定全局状态管理,让复杂的事情变简单。
- **⚡️ 天下武功,唯快不破** 只需将 `useState` 替换为 `useXState`,即可将组件内状态快速共享给其他父子或兄弟组件使用,就这么简单!
- **🧩 零学习、迁移成本** 可与项目中其他已使用的状态管理库共存,轻松切换,迁移无忧。
Expand Down

0 comments on commit 0f050c2

Please sign in to comment.