Closed SeanCassiere closed 2 years ago
I made a mistake earlier in the docs (in #4), and used the Class components method of setting the state, instead of the useState method of spreading the existing state.
This corrects it to setState((prev) => ({ ...prev, [name]: value }))
setState((prev) => ({ ...prev, [name]: value }))
I made a mistake earlier in the docs (in #4), and used the Class components method of setting the state, instead of the useState method of spreading the existing state.
This corrects it to
setState((prev) => ({ ...prev, [name]: value }))