Skip to content

Instantly share code, notes, and snippets.

@tanvirstreame
Last active September 17, 2019 11:49
Show Gist options
  • Save tanvirstreame/b29cf6a85b57f3204e765d67361886d1 to your computer and use it in GitHub Desktop.
Save tanvirstreame/b29cf6a85b57f3204e765d67361886d1 to your computer and use it in GitHub Desktop.
Function binding in reactjs
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