Re:Marty.js – A JavaScript library for state management in R...
by picardo on Wednesday January 21, 2015 @11:29AM
(#8923789)
You're right about the boilerplate. I use a wrapper around React.createClass to take care of that. Kinda similar to Marty.createStateMixin, but it's just a component factory.
The Chrome plugin looks very nice, but you can do the same thing with console.log() outputs in your store. It's a nice to have, but not filling a need for me.
Re:Marty.js – A JavaScript library for state management in R...
by catshirt on Wednesday January 21, 2015 @01:32PM
(#8924594)
> The Chrome plugin looks very nice, but you can do the same thing with console.log() outputs in your store.
by that logic, you don't need a debugger with breakpoints and stack traces either.
i mean... you could use a spoon for driving nails into wood instead of a hammer, too.
I found that no other Flux implementation really helped with fetching data in a Fluxy way. There tended to be a lot of boiler plate code for binding stores to components. Furthermore, there was a lack of tooling for debugging. Marty helps combat these issues by introducing a number of new things:
- Fetch API for fetching data asynchronously without callbacks http://martyjs.org/guides/stores/fetching-data.html - State Mixins for binding stores to views http://martyjs.org/api/state-mixin/ - State sources for syncing state from heterogeneous sources http://martyjs.org/guides/state-sources/index.html - Chrome Developer extension (beta) for visualising the data flow and state of stores http://martyjs.org/devtools/