Skip to content

Instantly share code, notes, and snippets.

@namelos
Created March 25, 2016 07:31
Show Gist options
  • Select an option

  • Save namelos/db36acf3151ea146b976 to your computer and use it in GitHub Desktop.

Select an option

Save namelos/db36acf3151ea146b976 to your computer and use it in GitHub Desktop.
const makeReactDriver = query =>
reactElement$ =>
reactElement$.subscribe(reactElement =>
render(reactElement, document.querySelector(query)))
const main = ({ react }) => {
return {
react: of(<h2>hello</h2>)
}
}
run(main, {
react: makeReactDriver('#app')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment