Effect CommunityEC
Effect Community3y ago
39 replies
TheStockBroker

Browser Choking Issue with `Effect.sleep` in `Rx`

@Tim Smart
When Effect.sleep is used in an Rx the entire browser is immediately choked and waits for the sleep effect to resolve. I was very surprise to find this...
const block = Rx.effect(() => Effect.sleep("10 seconds"));
function App() {
  const _ = useRxValue(block)
  
  return <Foo />
}

^Rendering nested in Foo works from what I see, but the application is entirely non-interactable. This includes browser features like scrolling
Was this page helpful?