Fork me on GitHub
#re-frame
<
2019-03-29
>
ag00:03:20

but why it works fine with non-minified js?

ag00:03:51

the issue appears only on minified source

lilactown00:03:17

not sure tbh. could be that some sort of dev-only code in React, Reagent or re-frame is obfuscating the issue

ag00:03:00

okay, I’ll dig a bit more

pez08:03:36

That's good to know.

eveko09:03:11

How does one go about making effects for window events? say a gradient shift for the entire baground on mouse move?

Wilson Velez14:03:36

Hi, How to avoid multiples AJAX requests when a field change its state? I mean, if the user is typing a name I don’t want to search for every letter just at the end

Wilson Velez14:03:00

I found that cljs-ajax has a property :on-request where we can get request and then maybe we can cancel it

Wilson Velez14:03:58

or other option is to put a timeout to execute the request and cancel it if the field changes before the timeout expires

manutter5114:03:08

The latter is pretty close to what I use. On change, I fire an event that checks to see if there's a pending timeout, and if there is, cancel it and start a new timeout. When the timeout fires, it triggers an event that does the actual ajax call.

👍 4
orestis15:03:38

See goog.functions.debounce

👍 8
Lu19:03:23

You want to have a look at debounce and throttle :)

Wilson Velez14:04:34

Thanks @UE35Y835W, I read about throttle but I really didn’t get it, and it worked with debounce so I didn’t look too much, but thank you any way.