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

ReactJS RefluxJS separation question #380

Closed
clintwood opened this issue Jul 25, 2015 · 4 comments
Closed

ReactJS RefluxJS separation question #380

clintwood opened this issue Jul 25, 2015 · 4 comments
Assignees
Milestone

Comments

@clintwood
Copy link

I'm totally new to and loving RefluxJS!

I get that the origins of Flux is off the back of ReactJS from FB so the bias is heavily leaning towards using RefluxJS with ReactJS and as such there appears to be a lot of code (I may well be wrong in this assessment) related to mixins for ReactJS.

I'm using the Polymer framework and it would be ideal if I could use RefluxJS 'core' without the ReactJS specific bits since I will probably build Polymer specific mixins. So the question is, seeing that the Flux pattern is really UI framework agnostic would it not make sense to structure RefluxJS in a way that has a core that is a pure Flux implementation with either an opt-in/out or plugin mechanism for ReactJS specific bits.

Maybe it could be structured like this:

// As is now and must stay: core RefluxJS + ReactJS bits
var Reflux - require('reflux');  // <-- (1)

// but also provide separate modules
var Reflux = require('reflux-core');  // core RefluxJS pure Flux implementation only

//  this is same as (1) above so you wouldn't do this for use with ReactJS, just use (1)
var refluxReact = require('reflux-react');  // ReactJS bits
Reflux.use(refluxReact(...));

// then this becomes possible (in another context)
var refluxPolymer = require('reflux-polymer'); // or Angular etc etc
Reflux.use(refluxPolymer(...));

I totally understand that one can just not use the ReactJS bits but feel that not making the ReactJS mandatory may open up RefluxJS to other use cases in other frameworks.

@LongLiveCHIEF LongLiveCHIEF added this to the 0.3.0 milestone Jul 25, 2015
@LongLiveCHIEF LongLiveCHIEF self-assigned this Jul 25, 2015
@LongLiveCHIEF
Copy link

This is most definitely on our roadmap, and we've been very heavily working on core design change concepts these. the last several days.

Whatever the outcome, Reflux will not have "React-ness" in the core, and will in fact be more friendly towards any view library. We also plan to design in a way to do Reflux/addons, and then create a Reflux React component. (#293)

@clintwood
Copy link
Author

That is awesome news! Looking forward to that.

@spoike
Copy link
Member

spoike commented Jul 28, 2015

I think we can do this with the 0.2 branch quite easily (and this has been requested in #107). Will see if we can do it soon.

spoike added a commit that referenced this issue Jul 28, 2015
Removed source and test that are specific to React. Fixing
test that was dependent on the listenTo mixin.

Refs #107 and #380
@spoike
Copy link
Member

spoike commented Jul 28, 2015

Released reflux-core 0.2.0-rc on npm if you want to play around with it right now. Let me know if there is anything else needed to be done. The repo is at: https://github.com/reflux/reflux-core. It is a fork of refluxjs, but with all the react specifics removed.

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

No branches or pull requests

3 participants