untangled

NEW CHANNEL: #fulcro
ianchow 2016-12-13T04:23:03.000262Z

here’s what i came up with fwiw. uses load-field and appears to work so far. https://gist.github.com/ianchow/43143a8134670eb8dc5a8133f7c75aa8

tony.kay 2016-12-13T05:12:17.000263Z

@ianchow looks like it might work. I’d tend to want to isolate the implementation from the UI, so having core async involved is somewhat undesirable here. You are allowed to keep the top-level app (and therefore the reconciler) in some kind of global. Setting some kind of timeout (say, an interval timer you debounce) that runs a load via the reconciler is more what I’d recommend. Then, your mutations on the UI events can be completely detached from the implementation of fetch/rerender: the mutations themselves hit the debounced timer, and when the timer goes off it can send off the load via the reconciler.

👍 1
tony.kay 2016-12-13T05:14:20.000264Z

if you still want to use core async that’s fine…I just wouldn’t mix it in with the nice pure UI rendering and certainly would be worried about combining it with local state. That said, I’d be tempted to use local state for the highlighting for speed in larger apps 🙂