Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lsbFlying committed Mar 18, 2024
1 parent c25d47d commit 836d32f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ function App() {
```

##### class

```tsx
import { useStore, ComponentWithStore } from "resy";

Expand Down Expand Up @@ -681,6 +682,7 @@ class AppClass extends ComponentWithStore {
}
}
```

</details>

## Advanced API
Expand All @@ -689,7 +691,7 @@ class AppClass extends ComponentWithStore {
| useConciseState | Concise version of useState |
| subscribe | Subscribe for changes in store data generated by createStore |
| useSubscription | Hook of subscribe |
| restore | Reset data of store, with re-render effect |
| restore | Restore data of store, with re-render effect |
| setOptions | Set the options parameter of createStore |

### Detailed introduction of api
Expand Down Expand Up @@ -743,6 +745,7 @@ function App() {
```

restore、syncUpdate、subscribe these api can also be deconstructed and used directly.

```tsx
import { useEffect } from "react";
import { useConciseState } from "resy";
Expand Down

0 comments on commit 836d32f

Please sign in to comment.