Fork me on GitHub
#re-frame
<
2024-01-10
>
scarytom15:01:58

@superstructor @mikethompson what's your feeling on the current maintenance state of re-frame-http-fx? I'm hitting issues getting access to response headers, and I notice issues raised about this years ago and a half-done fix by Isaac. If I put time into pull requests for some fixes, will they likely get merged promptly and a new release cut, or am I better off forking and building my own stuff?

mikerod15:01:55

I ended up rolling my own interceptor impl that did a pattern mostly like this: https://github.com/day8/re-frame-http-fx/issues/7#issuecomment-779548750 Not really trivial to do.

scarytom15:01:31

Thanks Mike, I did look at that comment. I already have a custom interceptor in play, so this isn't so hard for me to do, but I thought it might be nice to give something back if that's an option. I just don't want to waste my time if re-frame-http-fx is no longer being maintained.

mikerod15:01:39

Yeah, when I read this issue too. It seemed like there were also ideas of replacements libs for this entirely, but none of that looked active either when I checked.

scarytom15:01:39

considering how tiny the re-frame-http-fx lib is, it might be easiest for me to just re-implement it in my codebase, then I can do what I want.

mikerod15:01:26

They are fairly small libs for this sort of thing. There was one in that issue link above too that based it on Fetch API instead.

👍 1
p-himik15:01:03

That would be re-frame-fetch-fx, yeah. I'd definitely recommend using that instead. And if something fails, just copy the source in its entirety and change what you need.

thanks 1
mikerod15:01:46

I almost made the change over when I did this, but I had too much old code to refactor to something new - so just hacked at it.

mikerod15:01:55

I’d certainly rather do something basic over Fetch for future things though.

scarytom15:01:28

Thanks @U02J388JDEG. Going on the advice above, I've just flipped our entire codebase over to using re-frame-fetch-fx instead of re-frame-http-fx, so I won't be making a pull request now.

Ben Lieberman17:01:12

Has anyone encountered this behavior in re-frame-10x: (possibly important variable: I am using a windowing manager) but when I have the 10x panel popped out and the rest of Chrome (i.e. the window with my app) hidden, 10x lags. I can click things, try to resize the various panels, etc, but nothing happens unless I bring up the rest of Chrome again. Then 10x syncs up. Unfortunately, I'm on the go and have my small laptop screen only, so I'm having to juggle between editor/10x combo and 10x/app view combo, and that's why I'm running into this.

p-himik17:01:18

Haven't seen it, but browsers can suspend tabs in the background.

Ben Lieberman17:01:08

ah, that might explain it then. Thanks!

p-himik17:01:47

There's the "Always keep these sites active" setting, perhaps it can help.

p-himik17:01:41

There's also this issue: > requestAnimationFrame() calls are paused in most browsers when running in background tabs No idea whether related or not.

Ben Lieberman17:01:21

That's a Chrome issue or re-frame?

p-himik17:01:02

Neither, I'd say.

p-himik17:01:10

Because it's not an issue, it's a feature. :)

Ben Lieberman17:01:49

oh, sorry, I thought you meant it was an issue in the sense of a version control platform issue. Makes sense.

p-himik17:01:29

Ah. It's from the MDN docs of that function.

1