Last active
August 25, 2021 19:09
-
-
Save Mao8a/1e48b0e5bc1a8f85fa8e75e9bf7a4b56 to your computer and use it in GitHub Desktop.
JS: Component Init
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
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