Closed Frikki closed 8 years ago
Nowhere in the article is it recommended to use JSX with Cycle.js. In fact, I find that @donaldpipowitch went out of his way to clearly indicate that he is not making a recommendation, that it is a matter of personal taste, and that it is not a requirement. I understand that some Cycle.js users really dislike JSX; voice your opinion but I think if some people prefer to use JSX with Cycle.js nevertheless, understand that they have their reasons for choosing. Being able to use JSX with Cycle.js is appealing to some users.
@Frikki Is isolate stable now? I have mentioned it at the beginning as a new feature coming soon, but the last time I checked the docs didn't mention isolate.
Regarding JSX - what @foxdonut said. I don't want to make a recommendation for any side, but if you like I can highlight that JSX is way more untypical in the Cycle community compared to the React/Redux community in an additional paragraph.
@foxdonut I never implied that @donaldpipowitch recommended JSX with Cycle.js. I simply noticed the use of it in the examples. Cycle.js does recommend using hyperscript helpers, but offers the option to use JSX for those who favor that. This is, by the way, not my opinion, but how it is.
@donaldpipowitch Yes, the isolate
function is stable. However, it is not all drivers that support it, yet. And true, if you want to use it with the DOM driver, you need to use the release candidates. It is, however, only a matter of a couple of days when the official release will be out. So I’ll leave the choice to you what you recommend in your brilliant write-up.
@Frikki fair enough. Call it a misunderstanding. I still stand by my statement that @donaldpipowitch does an excellent job of explaining the use of JSX in the examples. If some readers just look at the code and draw conclusions without reading the article, it's not the author's fault.
@Frikki Are hyperscript-helpers actually still needed with the newest @cycle/dom version? It looks like helper are now included by default (https://github.com/Mercateo/component-check/blob/master/examples/static-components/cyclejs/src/static-component/index.js#L1). I'd like to add another paragraph about this topic.
@donaldpipowitch hyperscript helper functions are available through the DOM driver, just as the hyperscript function still is.
Example:
import {div, a, button, span} from '@cycle/dom'
@staltz fixed the examples so they use isolate
. I added a new paragraph to explicitly tell that hyperscript helpers are the recommendation for Cycle.
This issue should be fixed now.
Cool
The Cycle.js example under Interactive components is not up to date. While in the past it was true that we could use
cuid()
for generating a unique ID for a component, today we should useisolate()
https://github.com/cyclejs/isolate. The same holds true for the Composable components section.Also, while you can use JSX with Cycle.js, it is not the recommendation. Instead, Cycle.js recommends using hyperscript-helpers.