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

[known issue]: using ref() on certain objects fails #1

Open
brombal opened this issue Oct 13, 2024 · 0 comments
Open

[known issue]: using ref() on certain objects fails #1

brombal opened this issue Oct 13, 2024 · 0 comments

Comments

@brombal
Copy link
Owner

brombal commented Oct 13, 2024

Currently ref() marks an object as a reference by adding a symbol property to it, but this fails for objects are not extensible. The workaround is to wrap the desired ref object in another plain object, like this:

myState.someRef = ref({ value: nonExtensibleObject });

But this is not ideal. Keck should probably just use a WeakSet to store ref objects instead of a symbol property.

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

1 participant