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

Auto unwrapped template props are not considered reactive by toRefs #393

Closed
vmihailenco opened this issue Jun 21, 2020 · 3 comments · Fixed by #405
Closed

Auto unwrapped template props are not considered reactive by toRefs #393

vmihailenco opened this issue Jun 21, 2020 · 3 comments · Fixed by #405
Assignees
Labels
bug Something isn't working

Comments

@vmihailenco
Copy link

Following code

toRefs(props.foo)

logs following error

toRefs() expects a reactive object but received a plain one

Even though props.foo is a reactive object because of template auto unwrapping and it makes sense to use toRefs on such props.

Same code works fine with vue-next.

@jacekkarczmarczyk
Copy link
Contributor

@antfu
Copy link
Member

antfu commented Jun 21, 2020

@vmihailenco Can you share more details about your props?

@antfu antfu added the needs reproduction We need a runnable reproduction from the OP label Jun 21, 2020
@vmihailenco
Copy link
Author

@antfu antfu added bug Something isn't working and removed needs reproduction We need a runnable reproduction from the OP labels Jun 22, 2020
@antfu antfu self-assigned this Jun 22, 2020
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

Successfully merging a pull request may close this issue.

3 participants