jhegedus
jhegedus

Reputation: 20653

Why can I not use a React Component in a Cycle.js app?

If Cycle uses virtual dom and so does React, then why can I not use React Components inside a Cycle.js app?

Would it be possible to use wrap existing React Components into Cycle.js components ?

This question relates to : Higher order FRP with React - why is it not happening?

Upvotes: 1

Views: 542

Answers (2)

Luca Matteis
Luca Matteis

Reputation: 29267

Cycle.js is generic enough to be used along other frameworks/libraries. In fact there's redux-cycle-middleware which allows you to use React/Redux along with Cycle.js. With this middleware you wouldn't be using Cycle to handle DOM side-effects; instead you'd use React. Then when you need to handle other side-effects (HTTP, WebSockets, anything that isn't DOM...) you can use Cycle.js.

Upvotes: 2

André Staltz
André Staltz

Reputation: 13994

Because React's support for Web Components is lacking. See https://github.com/facebook/react/issues/7901 and http://staltz.com/react-could-love-web-components.html

It is technically possible to build React support in Cycle.js, but then you may also start asking whether other frameworks like Ember or Angular or Aurelia should start doing the same out of the box. Then, the question could be expanded even further by asking Aurelia components to be supported in Ember. So building support for "Foo" components in "Bar" framework is counter-productive. Web Components are the sane way to handle this.

Upvotes: 2

Related Questions