Fork me on GitHub
#re-frame
<
2018-10-27
>
kaosko02:10:25

just answering myself - helps to think aloud sometimes. I did end up using a layer 3 sub. the struggle I had was with trying to consolidate my data and others data but since I really need to worry about only possible changed at any given time, I just sub to that as an input and replace in the outgoing set

kaosko04:10:17

hmm I take that back. the layer 3 sub works great when I'm on the item being, but the data is still duplicated and as soon as I move on the next element, the stale data shows up in my calendar. would it be a total heresy to send a dispatch from a sub (as in, I noticed this data is changed, can you update)?

frenata13:10:37

> as soon as I move on the next element this sounds like a UI action that can dispatch an event dispatching from a sub sounds like a bad idea

mikethompson11:10:57

@gklijs Not sure i see it. useState seems more like cursors (which I regard as bad)

mikethompson11:10:02

Maybe if I read more I'll see the connection

mikethompson11:10:22

> With Hooks, you can extract stateful logic from a component so it can be tested independently and reused.

lwhorton19:10:58

i took a look at react hooks when my coworker told me about how exciting they’re going to be. i’m not sure i get it. i think i’ve been using reframe and cljs so long i’ve forgotten the problems that the javascript world is still trying to solve?

lwhorton19:10:14

the stateful/effect hooks still look far less powerful than* what subscriptions and event handlers provide

lwhorton19:10:05

maybe someone more recently involved in the react world can better explain to me the purpose?

mikethompson21:10:43

Question: who uses the Event Handler Tracing feature of re-frame-10x https://github.com/Day8/re-frame-10x/blob/master/docs/HyperlinkedInformation/EventCodeTracing.md I'm just trying to get a feel for who knows about it, and who actually uses it (as a proxy for who finds it useful).

8
frenata22:10:38

I have definitely used this to inspect the flow of data through event handlers. A common pattern is provoke some bad state, move backwards through the epochs, and look at the trace. The logical error is often immediately obvious at this point.

lwhorton16:10:47

i have never found the need to use it