Skip to content

Commit

Permalink
docs(store): few small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
DawidWraga committed May 23, 2024
1 parent da1ca76 commit 8ab6a4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/docs/pages/store/store-anatomy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Additionally, it helps to keep your code organized and provides useful autocompl
```tsx filename="stores/user-store.ts"
import { store } from '@davstack/store';

export const userStore = store
export const userStore = store()
.state({
name: 'John',
age: 25,
})
.computed((store) => ({
fullName: () => `${store.name.get()} Doe`,
fullName: () => `${store.name.use()} Doe`,
}))
.actions((store) => ({
incrementAge() {
Expand All @@ -38,7 +38,7 @@ userStore.name.get();

- **State**: a single source of truth that can be accessed and modified.
- **Actions**: functions that modify the state.
- **Computed Properties**: read-only derived values that are automatically updated when the state changes.
- **Computed Properties**: derived values that are updated when the state changes.

### Additional store concepts:

Expand Down

0 comments on commit 8ab6a4e

Please sign in to comment.