I have two component, I give my child component as props to my parent component and I want to separate onSubmit function.
I made a simple example to explain better :