Live data from Hacker News

Marty.js – A JavaScript library for state management in React applications

martyjs.org

91–95 of 95 posts

Re: Marty.js – A JavaScript library for state management in React applications

#91
I really want to use React in my next application, but I'm lost on how to do visual things like animation (like a carousel), drag-drop, typeahead.

Do you have any suggestion on the best practice on doing those heavy DOM stuff in React?

I know I can use jQuery for that, but it feels wrong to me.

Also how do you handle integrating React with command based JS library, where your only interface to it is to call mutating functions, such that you cannot blindly rerender the whole things.

Suggestions on these two issues would help me greatly.

Re: Marty.js – A JavaScript library for state management in React applications

#92
I really want to use React in my next application, but I'm lost on how to do visual things like animation (like a carousel), drag-drop, typeahead.

Do you have any suggestion on the best practice on doing those heavy DOM stuff in React?

I know I can use jQuery for that, but it feels wrong to me.

Also how do you handle integrating React with command based JS library, where your only interface to it is to call mutating functions, such that you cannot blindly rerender the whole things.

Suggestions on these two issues would help me greatly.

Re: Marty.js – A JavaScript library for state management in React applications

#93
I hope all the virtual-DOM based library comes to concensus with one based virtual-DOM library, or that it becomes part of the browser standard.

I don't mean the whole React library, I mean just "this a the DOM before, here's the change, now patch it" part.

More and more framework and UI library are going to be built around vritual-DOM concept. I don't want integration nightmare of UI-libraries working only on some React-like library.

Re: Marty.js – A JavaScript library for state management in React applications

#94
post #31

Earlier quoted context omitted.

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.

> 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 could also use a jackhammer, but that's not what jackhammers are for.

Re: Marty.js – A JavaScript library for state management in React applications

#95

Earlier quoted context omitted.

A few questions: - What is the equivalent of the global action bus in Flux? - How do you handle consuming data from multiple rest endpoints? - Suppose you want to restructure the components in the app into a different hierarchy, how much refactoring is involved? - Is there any open source example code of an app built this way that is more complex than a simple todo or simple async example? (I think the biggest challe…

In flux, all the data are stored in stores. When a component needs data, it subscribes to the relevant stores, and updates itself on data changes. When you want to mutate the data, you call an action, which in turns mutate the data in the store. Since the components are subscribed to stores, they get the new data automatically. Stores subscribe to a central dispatcher, listening to all actions. When an action fires,…

I know how this works in Flux, but wondering how it works using the approach w cursors.
Post reply on HN