Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Why ref wouldn't be unwrap when assign to a <ref>.value #13141

Unanswered
FoundTheWOUT asked this question in Help/Questions
Discussion options

ref will unwrapped when assign to a reactive obj, and will also unwrapped when passing it to the first argumrent of a ref.

const obj = reactive({})
const name = ref(1)
const foo = ref()
const bar = ref(name) // unwrapped
obj.foo = name // unwrapped
foo.value = name // not unwrapper
You must be logged in to vote

Replies: 0 comments

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

AltStyle によって変換されたページ (->オリジナル) /