Skip to content

Commit 35c2bb2

Browse files
committed
docs(create.md): fix state selector syntax in troubleshooting example
1 parent 07b32d6 commit 35c2bb2

File tree

2 files changed

+3002
-2514
lines changed

2 files changed

+3002
-2514
lines changed

docs/apis/create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ const usePersonStore = create<PersonStore>()((set) => ({
449449
}))
450450

451451
export default function Form() {
452-
const person = usePersonStore((state) => person)
453-
const setPerson = usePersonStore((state) => setPerson)
452+
const person = usePersonStore((state) => state)
453+
const setPerson = usePersonStore((state) => state.setPerson)
454454

455455
function handleFirstNameChange(e: ChangeEvent<HTMLInputElement>) {
456456
person.firstName = e.target.value

0 commit comments

Comments
 (0)