Fork me on GitHub
#re-frame
<
2019-01-17
>
hoopes00:01:37

sorry for simple question, but couldn’t find it in readmes and it’s not working for me now - can you add the trim-v interceptor to reg-sub ? are interceptors on reg-sub not a thing?

mikethompson01:01:45

@hoopes No, there's no such thing as trim-v for subs

hoopes01:01:44

ok, cool, thanks - is there a reason why not? not being pushy, just curious

mikethompson01:01:19

subs don't have interceptors

Braden Shepherdson15:01:22

I want a throttled dispatch-later, so I can do 40 {:ms 500 :dispatch [...]} over 200ms or so, and have a single dispatch fire 500ms after the first of them.

Braden Shepherdson15:01:02

actually, after the last would work too. basically I want to save to local storage once the user stops typing.

Braden Shepherdson15:01:44

(I'm writing one, but I wonder if that kind of debouncing is useful enough to go into re-frame)

Braden Shepherdson16:01:57

also, another round of my favourite perennial question: I still want an effective way to refresh particular slices of data from my server when various views come and go.

Braden Shepherdson16:01:20

having a big map in the router function is not great, but it mostly works.

Braden Shepherdson16:01:09

I still feel like it should be tied to the subscription lifecycle - start polling when subscriber count goes from 0 to 1, stop when it goes back to 0.

Jenny Kwan21:01:38

OK, day8.re-frame.http-fx question. I have a fx event handler returning http-xhrio with on-success set to :get-api-init-success. I can confirm in Chrome that the GET request is going out and is being responded to with a 200, application/json body. However, the corresponding db event handler for :get-api-init-success isn't firing at all. How do I debug this?

exit221:01:11

Is there a way to pass variables into the index.html file of a reframe project? I have some env variables I need to pass down into a script

exit221:01:29

I’m using the basic re-frame-template through lein

manutter5121:01:39

@me1238 Two things I can think to check: do you have [] around :get-api-init-success? and do you have :response-format set to ((ajax/json-response-format {:keywords? true}) (assuming you want keywords)

Jenny Kwan22:01:49

@manutter51 Yes and yes. Not sure where to go from here.

Jenny Kwan22:01:14

Used re-frame-10x and was able to see that on-failure is indeed firing, due to inability to parse the JSON.

Drew Verlee23:01:01

I understand effects aren't ordered, i'm curious where in the code i could see how that works? I'm not suggesting it be changed, i'm just curious as we have some ordering issues and we would like to reproduce them in order to fix them and i can't seem to reproduce them on my end 🙂