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

Standardize Ref apis #3688

Open
jessekelly881 opened this issue Sep 25, 2024 · 0 comments
Open

Standardize Ref apis #3688

jessekelly881 opened this issue Sep 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jessekelly881
Copy link
Contributor

What is the problem this feature would solve?

Switching from a Ref to a ScopedRef involves a lot of changes to how apis are called.

Ref.make(false)
Ref.set(ref, true)

vs

ScopedRef.make(() => false)
ScopedRef.set(ref, Effect.succeed(true))

What is the feature you are proposing to solve the problem?

It would be nice to standardize these so that switching from Ref to ScopedRef doesn't require dramatically changing how the different fns are called.

I don't have a strong preference one way or another about which api is better but maybe .set and .setEffect fns might be useful.

What alternatives have you considered?

No response

@jessekelly881 jessekelly881 added the enhancement New feature or request label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant