I just have a small problem.
I do not know how to update my empty string when handling a click
event. I am using React.
This is the most important part of my code:
// MultiStepform.js
const defaultData = {
// I would like to update this
Grund: '',
H: '',
W: '',
G: '',
};
export const MultiStepFrom = () => {
const [formData, setForm] = useForm(defualtData);
const {step, navigation} = useStep({
steps,
initialStep: 0,
});
const props = {formData, setForm, navigation};
};
H?user.js
I would like to perform her the onClick event)
function H?user({formData, setForm, navigation}) {
const {Grund, H, W, G} = formData;
const changState = () => {
navigation.next();
setForm([{Grund: "newvalue"}]);
}
);
}
return (
<div
className="container__containerimgage"
name="Grundstück"
value={Grundstück}
onClick={changState}
);
}
question from:
https://stackoverflow.com/questions/65853716/update-empty-string-with-an-onclick-event 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…