Answer the question
In order to leave comments, you need to log in
What type to specify for children.current in TS?
const handleClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>, children: ReactNode): void => {
if (children) {
const {current}: HTMLUListElement = children;
if (current) {
current.scrollTop = list.current.scrollHeight;
}
}
}
setTimeout(() => handleClick(e, props.children), 0);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question