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

toRaw() doesn't expose Refs like in Vue 3 #844

Open
posva opened this issue Nov 3, 2021 · 16 comments
Open

toRaw() doesn't expose Refs like in Vue 3 #844

posva opened this issue Nov 3, 2021 · 16 comments
Labels
bug Something isn't working

Comments

@posva
Copy link
Member

posva commented Nov 3, 2021

It seems like toRaw() on a reactive object doesn't expose the original properties like it does in Vue 3:

@posva posva added the bug Something isn't working label Nov 3, 2021
@posva
Copy link
Member Author

posva commented Nov 16, 2021

I'm unsure of what the correct fix is here since Vue 2 modifies the object in place with methods like Vue.observable() (used in reactive and ref) differently from Vue 3, which creates a Proxy (reactive(obj) != obj).
We could save a raw copy of the object passed to reactive() but it would require a deep copy and could have a small perf implication.

@github-actions
Copy link

Stale issue message

@github-actions
Copy link

Stale issue message

@github-actions
Copy link

Stale issue message

@github-actions
Copy link

Stale issue message

@Benleie
Copy link

Benleie commented Jul 20, 2022

So, how to do with it?

@github-actions
Copy link

Stale issue message

@github-actions
Copy link

Stale issue message

@imguolao
Copy link

Is there a solution now?

@github-actions
Copy link

Stale issue message

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Stale issue message

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Stale issue message

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Stale issue message

Copy link

github-actions bot commented Dec 2, 2023

Stale issue message

Copy link

github-actions bot commented Feb 1, 2024

Stale issue message

Copy link

github-actions bot commented Apr 2, 2024

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants