Last active
September 17, 2019 11:49
-
-
Save tanvirstreame/b29cf6a85b57f3204e765d67361886d1 to your computer and use it in GitHub Desktop.
Function binding in reactjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In react js you can sent send data by props parent to child , | |
aslo you can controll parent function from child one | |
this is in parent- | |
saveHandler = () => { | |
} | |
<VehicleCreateExtraInfoForm | |
saveHandler={this.saveHandler} | |
/> | |
form child - | |
<form | |
onSubmit={this.saveHandler} | |
className="sub-form" | |
method="post" | |
> | |
<input type="submit" value="Save" /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment