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

props is not reactive in 2.7.0-beta.2 #12561

Closed
sxzz opened this issue Jun 17, 2022 · 0 comments
Closed

props is not reactive in 2.7.0-beta.2 #12561

sxzz opened this issue Jun 17, 2022 · 0 comments
Labels

Comments

@sxzz
Copy link
Member

sxzz commented Jun 17, 2022

Version

2.7.0-beta.2

Reproduction link

stackblitz.com

Steps to reproduce

import { defineComponent, isReactive, toRefs } from 'vue';

export default defineComponent({
  props: {
    foo: String,
  },
  setup(props) {
    console.log(props, isReactive(props));

    // toRefs() expects a reactive object but received a plain one.
    console.log(toRefs(props, 'foo'));
  },
});

What is expected?

props is reactive.

What is actually happening?

props is not reactive.


P.S. createApp doesn't exist now. Will it be added in the final version of 2.7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants