Skip to content

Instantly share code, notes, and snippets.

@alastairparagas
Created July 3, 2018 23:29
Show Gist options
  • Select an option

  • Save alastairparagas/2a639cdcea276b9614958a1d1ae16d0a to your computer and use it in GitHub Desktop.

Select an option

Save alastairparagas/2a639cdcea276b9614958a1d1ae16d0a to your computer and use it in GitHub Desktop.
// Your React Component
class VisaCheckboxComponent extends React.Component {
// Deal with your constructor as you please
// Other methods of your component
onClick() {
this.props.onClick();
// Other stuff that onClick should do like setState
}
// This render returns the actual HTML code of Visa Web UI, in JSX form
render() {
return (
<whatever-visa-html-code... onClick={this.onClick.bind(this)}>
);
}
}
// When using your component - goToAnotherPage
<VisaCheckboxComponent onClick={() => {
// Do stuff here that handles the actual routing to another page
}}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment