examples/tonic-example.js
function render() {
  return h('div', [
    h('input', {
      type: 'text', placeholder: 'What is your name?',
      value: yourName, oninput: handleNameInput
    }),
    h('p.output', ['Hello ' + (yourName || 'you') + '!'])
  ]);
}
function render() {
  return h('div', [
    h('input', {
      type: 'text', placeholder: 'What is your name?',
      value: yourName, oninput: handleNameInput
    }),
    h('p.output', ['Hello ' + (yourName || 'you') + '!'])
  ]);
}
function render ( ) { return h ( 'div' , [ h ( 'input' , { type : 'text' , placeholder : 'What is your name?' , value : yourName , oninput : handleNameInput } ) , h ( 'p.output' , [ 'Hello ' + ( yourName || 'you' ) + '!' ] ) ] ) ; }
This function uses the 'hyperscript' notation to create the virtual DOM.
This function uses the hyperscript notation to create the virtual DOM .