Request gets executed before effect is run
See original GitHub issueRunning the following code prints Called
, even though the effect is never run:
val service = HttpService[IO] {
case GET -> Root =>
println("Called")
Ok()
}
val client = Client.fromHttpService(service)
client.expect[Unit]("/")
Thread.sleep(1000)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
What's useEffect execution order and its internal clean-up ...
One thing that's not clear in the above answers is the order in which the effects run when you have multiple components in...
Read more >Issue: `useEffect` executed before browser can paint DOM ...
Your event handler triggers a render, which has a passive effect and nothing special causes that effect to run before the paint. This...
Read more >React useEffect Hook usages you must know - GreenRoots Blog
Learn the practical usages of useEffect Hook in React. This article shows you how to manage a component's side effects with various use ......
Read more >useEffect(), Http Requests & Aborting - Academind
Imagine a case where out component is mounted and useEffect() hook executes but before the Http request completes, our component is unmounted ...
Read more >The last guide to the useEffect Hook you'll ever need
An effect's cleanup function gets invoked every time, right before the execution of the next scheduled effect. Let's take a closer look at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For the record, this strictness is exactly why this was deprecated (would’ve outright removed it were it not for bincompat)
Ah, that makes sense. I found this while debugging an issue which seemed to be caused by that, but I think I know what the problem is now. Thanks!