salsita / prism

React / Redux action composition made simple http://salsita.github.io/prism/
496 stars 24 forks source link

Publish the pattern matching part stand-alone #4

Closed Phoenixmatrix closed 7 years ago

Phoenixmatrix commented 8 years ago

I'm really liking what I'm seeing here. I'm usually fairly critical of "Redux alternatives", since their only goal is usually to reduce typing while increasing complexity, but there's a lot of great ideas here, and it's quite elegant, after having played with Elm itself a little.

The thing I'm missing the most in JS is pattern matching, and most of the libraries out there to help with it either have weird APIs or require SweetJS macros.

The idea of a Redux reducer optimized pattern matching lib (as opposed to the silly "use a keyed object instead of a switch options out there) is really appealing to me, and I think with a bit of polish could really stand on its own and make any Redux implementation better.

Just my 2 cents :)

tomkis commented 8 years ago

Hello @Phoenixmatrix, we'r glad for your feedback! :-)

The thing is that we are in the middle of working on 1.x (https://github.com/salsita/redux-elm/issues/5) and currently Pattern matching part is kinda hard-wired into Updater implementation which would make sense to publish as standalone package but we'd need get rid of Generators dependency, which frankly would be quite difficult now.

However, this is planned as next step after we'r done with 1.x.

tomkis commented 8 years ago

@Phoenixmatrix would you be willing to have a look at #36 which actually separates the concerns? If it's good enough, i'll pull this into a standalone library.

tomkis commented 7 years ago

Closing, nothing actionable here.