Answer the question
In order to leave comments, you need to log in
Throw props using TS?
There are 2 functional components, Parent and Child. I throw props in this way.
Answer the question
In order to leave comments, you need to log in
export const Auth: React.FC = () => {
const onChange1 = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {}, []);
const onChange2 = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {}, []);
return(
<Child Parent = {{onChange1, onChange2}}/>
)
}
export const Child: React.FC<Props> = ({onChange1, onChange2}) => {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question