Skip to content

Instantly share code, notes, and snippets.

@simbathesailor
Last active December 24, 2019 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simbathesailor/c105910fff564b1238634da5e2e6ebd8 to your computer and use it in GitHub Desktop.
Save simbathesailor/c105910fff564b1238634da5e2e6ebd8 to your computer and use it in GitHub Desktop.
Lifecycle instance functions
class App extends React.Component() {
callback = () => {
// some logic
};
callback2 = () => {
// some logic
};
render() {
return (
<div>
<SomeChildComponent callback={callback} callback2={callback2} />
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment