Skip to content

Commit 8fcae74

Browse files
Update createSlice.mdx
``` store.dispatch(counter.actions.increment()) // -> { counter: 1, user: {name : '', age: 21} } store.dispatch(counter.actions.increment()) // -> { counter: 2, user: {name: '', age: 22} } store.dispatch(counter.actions.multiply(3)) // -> { counter: 6, user: {name: '', age: 22} } store.dispatch(counter.actions.multiply()) // -> { counter: 12, user: {name: '', age: 22} } console.log(`${counter.actions.decrement}`) // -> "counter/decrement" store.dispatch(user.actions.setUserName('eric')) // -> { counter: 12, user: { name: 'eric', age: 22} } ``` last lint should be counter : 12 not counter : 6
1 parent 2e50c66 commit 8fcae74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api/createSlice.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,5 +287,5 @@ store.dispatch(counter.actions.multiply())
287287
console.log(`${counter.actions.decrement}`)
288288
// -> "counter/decrement"
289289
store.dispatch(user.actions.setUserName('eric'))
290-
// -> { counter: 6, user: { name: 'eric', age: 22} }
290+
// -> { counter: 12, user: { name: 'eric', age: 22} }
291291
```

0 commit comments

Comments
 (0)