Do you prefer Ref<T> = ref() or ref<T>()? #8597
olinoles
started this conversation in
General Discussions
Replies: 1 comment
-
I always use like
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Both obviously achieve type support for Vue Refs but the syntax reads quite differently.
I'm interested to hear the communities preference.
Examples:
const myVar: Ref<string> = ref('hello');
const myVar = ref<string>('hello');
Beta Was this translation helpful? Give feedback.
All reactions