Guest User

Untitled

a guest
Dec 15th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. const data = [1,2,3]
  2.  
  3. hyperHTML.bind(document.getElementById('root'))`
  4. <h1>Hello, world!</h1>
  5. ${ data.map( num => hyperHTML.wire()`<li>${num}</li>` ) }
  6. `;
  7.  
  8. hyperHTML.bind(document.getElementById('root'))`
  9. <h1>Hello, world!</h1>
  10. ${ data.map( num => `<li>${num}</li>`) }
  11. `;
  12.  
  13. hyperHTML.define(numberListItem, num => `<li>${num}</li>`)
  14.  
  15. hyperHTML.bind(document.getElementById('root'))`
  16. <h1>Hello, world!</h1>
  17. ${ data.map( num => ${{numberListItem: num}}) }
  18. `;
Add Comment
Please, Sign In to add comment