My #PolymerSummit 2017, day 2 takeaways
During day 1 of the Polymer Summit , we learnt about the Polymer 3 shift to JavaScript Modules and the NPM package manager. We were introduced to the template property getter, which returns your component's Shadow DOM, rather than using a template tag: static get template() { return `<div>My component contents, with tags and everything! ${interpolated_value_here}</div> `; } On day 2, we got introduced to the lit-html template library which gives us the html template tag and a render function: const helloTemplate = ( name ) => html ` < div >Hello ${ name } !</ div > ` ; // renders <div>Hello Steve!</div> to the document body render ( helloTemplate ( ' Steve ' ), document . body ); // updates to <div>Hello Kevin!</div>, but only updates the ${name} part render ( helloTemplate ( ' Kevin ' ), document . body ); This library can also be used with a component system that renders your component