Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Cats Effect v3.5.0-RC1 #192

Merged
merged 5 commits into from
Feb 14, 2023
Merged

Conversation

armanbilge
Copy link
Owner

We now take advantage of the new runtime and remove a lot of hacks!

How it works is described in the updated documentation.

calico/docs/index.md

Lines 121 to 130 in a4ee610

However, there are certain situations where you may want the browser to re-render in the middle of a task. In these cases, simply sequence an `IO.cede` operation. This will temporarily yield control flow back to the browser so that it may re-render the UI, before resuming the task.
```scala
updateComponentA *> // doesn't render yet
updateComponentB *> // still didn't render
IO.cede *> // re-render now
doOtherStuff *> ... // do non-view-related work
```
Explicitly inserting an `IO.cede` can be a useful strategy to improve your app’s UX, by re-rendering as soon as you are done updating the view, and deferring other work until after the re-render. This will make your UI more responsive.

Closes #150.

Copy link
Collaborator

@2chilled 2chilled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exciting, thank you!

@armanbilge armanbilge merged commit 5799248 into main Feb 14, 2023
@armanbilge armanbilge deleted the update/cats-effect-3.5.0-RC1 branch February 14, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revisit DomHotswap and .cedeBackground
2 participants