Skip to content

Commit c98b38a

Browse files
ktsnyyx990803
authored andcommitted
docs: update state option type (#951)
1 parent 804c3bb commit c98b38a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: docs/en/api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ const store = new Vuex.Store({ ...options })
1212

1313
- **state**
1414

15-
- type: `Object`
15+
- type: `Object | Function`
1616

17-
The root state object for the Vuex store.
17+
The root state object for the Vuex store. [Details](state.md)
1818

19-
[Details](state.md)
19+
If you pass a function that returns an object, the returned object is used as the root state. This is useful when you want to reuse the state object especially for module reuse. [Details](modules.md#module-reuse)
2020

2121
- **mutations**
2222

0 commit comments

Comments
 (0)