Skip to content

Commit

Permalink
docs(create.md): fix state selector syntax in troubleshooting example (
Browse files Browse the repository at this point in the history
  • Loading branch information
HoberMin authored Jan 6, 2025
1 parent 07b32d6 commit efaf416
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/apis/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ const usePersonStore = create<PersonStore>()((set) => ({
}))

export default function Form() {
const person = usePersonStore((state) => person)
const setPerson = usePersonStore((state) => setPerson)
const person = usePersonStore((state) => state)
const setPerson = usePersonStore((state) => state.setPerson)

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

0 comments on commit efaf416

Please sign in to comment.