Skip to content

Instantly share code, notes, and snippets.

@oyeharry
Created June 17, 2018 09:47
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 oyeharry/c2745ee79c3f7ffba75c65d73be1bb22 to your computer and use it in GitHub Desktop.
Save oyeharry/c2745ee79c3f7ffba75c65d73be1bb22 to your computer and use it in GitHub Desktop.
//This is how we initialised component in the old days.
//jQuery plugin example
$('#myComponentElement').myAwesomeComponent({value:'Awesome'});
//ExtJS framework example
Ext.create('Ext.MyAwesomeComponent', {
id:'myComponent',
renderTo: document.querySelector('#myComponentElement'),
html:'Awesome'
});
//BackboneJS View example
new MyAwesomeComponentView({model:'awesome', el:'#myComponentElement'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment