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

Typo/bug in Vue 3.3 release blog post #19

Open
santiagoarizti opened this issue May 11, 2023 · 3 comments
Open

Typo/bug in Vue 3.3 release blog post #19

santiagoarizti opened this issue May 11, 2023 · 3 comments

Comments

@santiagoarizti
Copy link

I think in line 240 in the Vue 3.3 blog post there is a typo.

It reads: useFeature(() => props.foo)

It should say: useFeature(toValue(() => props.foo))

@icarusgk
Copy link

I think it might be () => props.foo as discussed in this RFC 👀

With the toRef() enhancement and toValue() introduced in vuejs/core#7997, I hope we can consolidate the pattern to:

// with props object
const props = defineProps(['foo'])
useComposable(() => props.foo)

// with destructure
const { foo } = defineProps(['foo'])
useComposable(() => foo)

@santiagoarizti
Copy link
Author

Interesting then why they put this as an example of the usage of the tovalue() function

@icarusgk
Copy link

To show how this becomes a consolidated pattern. You can read more about the toValue() implementation here.

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