Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How easy would it be to swap Hyperscript for JSX? #26

Open
nickeblewis opened this issue Jul 7, 2016 · 3 comments
Open

How easy would it be to swap Hyperscript for JSX? #26

nickeblewis opened this issue Jul 7, 2016 · 3 comments

Comments

@nickeblewis
Copy link

We are looking at converting this to use JSX - I have got that working elsewhere in another project.... struggling to achieve the same thing here. How can I for example just amend the Page1 view js file??

@Cmdv
Copy link
Owner

Cmdv commented Jul 7, 2016

Hi, to achieve this you would have to also import the hJSX from cycle/dom

import {makeDOMDriver, hJSX} from '@cycle/dom';

function main(drivers) {
  return {
    DOM: Observable.timer(0, 1000)
      .map(i => <div>Seconds elapsed {i}</div>)
  };
}

I took that code example from here

@nickeblewis
Copy link
Author

Many thanks @Cmdv - shall give that a go

@Cmdv
Copy link
Owner

Cmdv commented Jul 7, 2016

cool @nickeblewis I tend not to use JSX but if you want some more insight, I recommend you ask on the Cycle gitter channel if you are not already registered.

but the new example I gave uses snabdom-jsx which I think might be needed here too just not 100% sure. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants