Skip to content

Commit

Permalink
Merge branch 'main' into feat/avoid-action-merging
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Sep 28, 2024
2 parents 08091dc + 07b8fe7 commit a0bd331
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/getting-started/01_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ By utilizing `create` from Zustand, you can combine these slices into a single s
const useCountStore = create(withSlices(countSlice, textSlice));
```

> 💡 **Note:** Actions with the same name across slices are merged into a single action in the combined store. Calling such an action executes the corresponding actions from each slice. For example, since both slices have a `reset` action, calling `reset` will reset both `count` and `text` to their initial values.
### Easily utilize it in your components

Finally, you can seamlessly integrate and access your store directly into your component logic utilizing the `useCountStore` hook.
Expand Down

0 comments on commit a0bd331

Please sign in to comment.