optimizely / nuclear-js

Reactive Flux built with ImmutableJS data structures. Framework agnostic.
https://optimizely.github.io/nuclear-js/
MIT License
2.23k stars 141 forks source link

Is ImmutableJS necessary? #150

Closed mindjuice closed 9 years ago

mindjuice commented 9 years ago

I've been using ImmutableJS for my current Nuclear project, but recently came across updeep and find it rather nicer to use than ImmutableJS (although perhaps not as performant).

Is it possible for NuclearJS to avoid the direct dependency on ImmutableJS and simply state that payloads will be triple equals compared for change detection? Then users could choose any immutability lib they like (or none at all for very simple apps).

Curious for your thoughts on this.

Thanks.

jordangarcia commented 9 years ago

The current implementation has a hard dependency on ImmutableJS. Something I've been thinking about is a more generic type/interface for getters allowing different types of data to be stored while defining how equality it should work (think Comparator interface)

For smaller apps that use NuclearJS design patterns I would suggest Microcosm