How do I capture user input and assign it to a React hook?
const { specName, setSpecName } = useState("");
<input
name="name"
onChange={e => { setSpecName(e.target.value) }}
value={specName}
className="specialist-profile-input"
type="text"
placeholder={user.name} />
<input type="submit" value="Save" />
As I start writing, I encounter the error message "TypeError: setSpecName is not a function". I followed a pattern from someone else but it's not working for me. Can someone please help me fix this issue?