Skip to content

Commit 038b938

Browse files
docs(updating-state): use curried create form with explicit state type (#3503)
1 parent 60a91b4 commit 038b938

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎docs/learn/guides/updating-state.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type Action = {
2323
}
2424

2525
// Create your store, which includes both state and (optionally) actions
26-
const usePersonStore = create<State & Action>((set) => ({
26+
const usePersonStore = create<State & Action>()((set) => ({
2727
firstName: '',
2828
lastName: '',
2929
updateFirstName: (firstName) => set(() => ({ firstName: firstName })),

0 commit comments

Comments
 (0)