Fork me on GitHub
#re-frame
<
2015-07-08
>
braai engineer09:07:02

Having some issues with flickering due to dispatching in :component-did-mount. In this case I need to track if a user is verified or not and the view is triggering a dispatch that changes the verified value. This seems to cause the component to re-mount. I expect it to re-render, but not re-mount. How should I manage this lifecycle?

braai engineer10:07:13

Solved my problem. Moved the dispatch to the routing layer.

ul16:07:04

Hey, watched David's talk about Om Next today, I think that re-frame approach enables us to apply such things as addon, w/o any touch of views and most parts of architecture. We only need to make system to be notified when missing data from app-db is requested by subscription and query it in a batch from server. Meanwhile subscription could return any value signaling that data are not ready yet. On arrive, everything will be automatically updated. Yes, of course view should deal with case when data they subscribed is not ready yet, but they should do that in any good scenario, not only GraphQL/Relay-like

ul16:07:09

Any thoughts?