const handleChange = ({ target }: { target: HTMLInputElement | { name: string, value: moment.Moment | string | null } }) => {
const { name, value } = target;
// if (target instanceof HTMLInputElement) {
// } else {
// }
// moment.isMoment(value);
console.log(name, value);
setData({ ...data, [name]: value });
};
'web > javascript' 카테고리의 다른 글
화면 활성화 비활성화 active deactive , visibilitychange (0) | 2022.08.19 |
---|---|
antd useRef current.focus (0) | 2022.06.14 |
react class componet (0) | 2022.04.04 |
Promise then (0) | 2021.10.01 |
async await Promise.resolve (0) | 2020.07.20 |
댓글