Skip to content

Instantly share code, notes, and snippets.

@Mao8a
Last active August 25, 2021 19:09
Show Gist options
  • Save Mao8a/1e48b0e5bc1a8f85fa8e75e9bf7a4b56 to your computer and use it in GitHub Desktop.
Save Mao8a/1e48b0e5bc1a8f85fa8e75e9bf7a4b56 to your computer and use it in GitHub Desktop.
JS: Component Init
const componentName = {
myFunction: function() {
// Contents Go Here
},
bindAction: function() {
this.myFunction();
},
init: function() {
this.bindAction();
}
}
export const initComponentName = () => {
componentName.init();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment