Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Parent extends Component {
  2.   mySubmitFunction(){
  3.     ...some function...
  4.   }
  5.   render(){
  6.     <div>
  7.       <Child submissionFunction={this.mySubmitFunction} />
  8.     </div>
  9.   }
  10. }
  11.  
  12.  
  13. class Child extends Component {
  14.   render(){
  15.     <form onSubmit={this.props.submissionFunction}>
  16.       ...
  17.     </form>
  18.   }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement