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

Adopting a reactive array or object #5

Open
wycats opened this issue Jun 22, 2022 · 1 comment
Open

Adopting a reactive array or object #5

wycats opened this issue Jun 22, 2022 · 1 comment
Milestone

Comments

@wycats
Copy link
Member

wycats commented Jun 22, 2022

Currently, reactive.object and reactive.array copy the object's contents and freeze it to prevent further access.

In some situations, such as internal code loading data from a JSON endpoint that immediately wraps it in a "store", it would be better to "adopt" the JSON object. This would mean that we would turn the object itself into the proxy's target, and rely on the user not to access it directly anymore.

We could probably freeze the original object in development mode to help catch bugs, but this feels like a reasonable low-level primitive for people building abstractions around Starbeam.

@wycats wycats added this to the Starbeam 0.7 milestone Jun 22, 2022
@NullVoxPopuli
Copy link
Contributor

@wycats is this dealt with?

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

No branches or pull requests

2 participants