reflux / refluxjs

A simple library for uni-directional dataflow application architecture with React extensions inspired by Flux
BSD 3-Clause "New" or "Revised" License
5.36k stars 330 forks source link

Drop React peer dependency and/or move mixins to another project #434

Closed rooftopsparrow closed 8 years ago

rooftopsparrow commented 8 years ago

Hello refluxjs contributors!

As similarly suggested in issue #423, I'm suggesting that peer dependency be dropped all together because there really is no dependency on React. Its very much possible that Reflux can be used with or without React.

In fact, the mixins made specifically for React just return specific function signatures that could be used anywhere. There actually isn't a part of React being used as a peer dependency would suggest.

Reflux could be used anywhere someone wants to have the benefits of a flux like architecture. I think the library would benefit from not having to drag along a peer dependency. Perhaps another project, like reflux-mixin-react, could enable a peer dependency on a React and Reflux versions to keep the method signatures in React aligned and tested separately for that purpose.

Anyway, thanks for the great library!

spoike commented 8 years ago

The React dependency is dropped in reflux-core project, all of the functionality that isn't specific to React is moved over there. reflux is an extension of the reflux-core library, with React specific mixins in it.

AFAIK, other than React, reflux-core has been extended for vue and riot.

The peer dependency in the reflux npm package is there mostly as a stamp of approval that the mixins will work on those versions of React's API. We should probably rename the reflux package to reflux-react instead at some point (a lot like how Babel 6 is killing it's babel package).

rooftopsparrow commented 8 years ago

Ah, very nice. I did not realize the reflux-core was there :+1: Thanks for the response and thank you so much for your contributions to the open source community!