dazld 2020-06-16T17:31:59.401600Z

hey, just wondering if any of you have come across this before - dispatches aren't processed in safari when the browser window isn't active.

dazld 2020-06-16T17:36:00.403400Z

the queues are processed when the tab is made active / browser window becomes visible etc


Has anyone used re-frame + react-native with microsoft’s new macos and windows targets?

dazld 2020-06-16T17:39:29.403700Z

not just safari, so I guess this is by design?


Oh, you might be hitting a requestanimationframe thing? Reframe uses that for working out when to re-run computations. I believe browsers pause that when the window is inactive. Docs reference:

dazld 2020-06-16T18:46:15.404600Z

yep, rAF is paused when the tab isn't visible

dazld 2020-06-16T18:46:52.404800Z

@trybeee setImmediate calls aren't processed in the background, when tabs are inactive?

dazld 2020-06-16T18:48:52.405Z

oh, there's terrible browser support for it! looks like nextTick will almost always use the polyfill

dazld 2020-06-16T18:55:34.405200Z

so i guess what's happening is that the dispatch queue is being processed, but the reactions aren't.

dima 2020-06-16T19:04:57.405600Z

@dazld you’re right. background timers are processed in background (no more than 1 per sec though in Chrome) but rAF is not

dazld 2020-06-16T19:25:02.406400Z

Super interesting, thanks!