mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
docs(create.md): fix state selector syntax in troubleshooting example (#2938)
This commit is contained in:
parent
07b32d68ad
commit
efaf416de4
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user