Skip to content

Creating signals for Map, Set, Iterable, List #9

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

Merged
merged 6 commits into from
Nov 27, 2023
Merged

Conversation

rodydavis
Copy link
Owner

@rodydavis rodydavis commented Nov 25, 2023

Instead of:

final s = signal<List<String>>(['a', 'b', 'c']);

Could become:

final s = <String>['a', 'b', 'c'].toSignal();

This applies to Map, Set, List and Iterable and implements all the public methods and type for each.

@rodydavis
Copy link
Owner Author

Right now if a computer references a ListSignal there needs to be an explicit toList called to trigger rebuild

@rodydavis
Copy link
Owner Author

Curious if others have thoughts on this! Will merge if no major issues raised

@Kypsis
Copy link

Kypsis commented Nov 26, 2023

These changes are definitely more ergonomic to use and have better self-documenting properties 👍

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.

2 participants