📅  最后修改于: 2022-03-11 15:04:22.549000             🧑  作者: Mango
// Get all input value by onKeyUp event using one function
const [student, setStudent] = useState({});
const setStudentValue = (e) => {
let set = {};
set[e.target.name] = _.trim(e.target.value);
setStudent({
...student,
...set
});
}
//
// set data
// {firstName: ""} - output