<commit_before>import {run} from '@cycle/core';
import {h, makeDOMDriver} from '@cycle/dom';

function main(responses) {
  return {
    DOM: responses.DOM.get('.field', 'input')
      .map(ev => ev.target.value)
      .startWith('')
      .map(name =>
        h('div', [
          h('label.label', 'Name:'),
          h('input.field', {attributes: {type: 'text'}}),
          h('hr'),
          h('h1.header', 'Hello ' + name)
        ])
      )
  };
}

run(main, {
  DOM: makeDOMDriver('.cycle')
});<commit_msg>Add JSX to Cycle<commit_after>/** @jsx hJSX */
import {run} from '@cycle/core';
import {hJSX, makeDOMDriver} from '@cycle/dom';

function main(responses) {
  return {
    DOM: responses.DOM.get('.field', 'input')
      .map(ev => ev.target.value)
      .startWith('')
      .map(name =>
        <div>
          <label className="label">Name:</label>
          <input type="text" className="field"/>
          <hr/>
          <h1 className="header">Hello {name}</h1>
        </div>
      )
  };
}

run(main, {
  DOM: makeDOMDriver('.cycle')
});
{'fraction_non_alphanumeric': 0.2066350710900474, 'fraction_numerical': 0.002843601895734597, 'mean_word_length': 2.4064516129032256, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '858844', 'n_tokens_mistral': 364, 'n_tokens_neox': 362, 'n_words': 72}