#Enhancement:Cleaner State Management #447
Closed
SykoDaedalus wants to merge 1 commit intoarmanbilge:mainfrom
Closed
#Enhancement:Cleaner State Management #447SykoDaedalus wants to merge 1 commit intoarmanbilge:mainfrom
SykoDaedalus wants to merge 1 commit intoarmanbilge:mainfrom
Conversation
…er state management
f44c110 to
8091e46
Compare
Author
|
Hey @armanbilge @kubukoz please review the PR |
Collaborator
|
I'm not sure this is something we need, it's not that much harder to create a SignallingRef yourself. Conciseness is good, but I'd posit that creating refs isn't what's making Calico apps verbose. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a state helper to simplify SignallingRef creation, reducing boilerplate and improving the ergonomics of Calico’s DSL.
Implementation Details
Added a new extension method in
calico/syntax.scala:Wraps the verbose
SignallingRef[IO].of(initial).toResourcepattern into a concise, reusable utility.Integrated into the DSL to streamline state management for reactive components.
Example Usage
Before:
After (with state):
Tested locally in a todoMvc app—builds and runs smoothly.