fdecampredon / rx-flux

The Flux architecture with RxJS
255 stars 15 forks source link

Advice on using confirm in store operations #7

Closed BerkeleyTrue closed 9 years ago

BerkeleyTrue commented 9 years ago

First, great project! Making heavy use of this in a project and I love the way everything starts to flow together.

I am currently creating an isomorphic flux app using rx-flux and rx-react( also an awesome project by the way, many kudos to you).

I am trying to handle updating stores for rendering to string before sending to user. I had a setup working but it wasn't very flux-y so I am trying to make use of the new api for stores, mainly the confirm property in an operation.

My question: When I use the confirm property, are store subscribers updated after the confirm evaluates? It seems from reading the code that the confirm happens after notifyObservers is called, which then makes me wonder what is the purpose of the confirm property.

BerkeleyTrue commented 9 years ago

Realized that confirm is for reversal of a process. Tried using the waitFor in actions, but for some reason it would just hang. I ended up creating my own waitfor without the takeUntil/publish/connect functionality (still not sure what that bit of code is doing there either so if you got a second I would love to hear how that works).