Skip to content

Commit e7d189e

Browse files
committed
update
1 parent 41c389d commit e7d189e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/routes/reference/store-utilities/produce.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ tags:
88
- mutations
99
version: "1.0"
1010
description: >-
11-
Create a store modifier that applies changes by mutating a draft value.
11+
Create a store modifier that applies changes by mutating the current state through a helper proxy.
1212
---
1313

14-
`produce` creates a store modifier that applies changes by mutating a draft value.
14+
`produce` creates a store modifier that applies changes by mutating the current state through a helper proxy.
1515

1616
## Import
1717

@@ -31,7 +31,7 @@ function produce<T>(fn: (state: T) => void): (state: T) => T;
3131

3232
- **Type:** `(state: T) => void`
3333

34-
Function that mutates the provided draft state.
34+
Function that mutates the provided proxy state.
3535

3636
## Return value
3737

@@ -42,8 +42,8 @@ Store modifier function.
4242
## Behavior
4343

4444
- `produce` returns a function that can be passed to store setters or [`modifyMutable`](/reference/store-utilities/modify-mutable).
45-
- The modifier receives a mutable draft of the current state.
46-
- Nested properties can be changed inside the modifier.
45+
- The returned modifier mutates the passed state and returns that same state.
46+
- The helper is primarily for store objects and nested wrappable data.
4747

4848
## Examples
4949

0 commit comments

Comments
 (0)