Hacker News new | ask | show | jobs
by rk06 1380 days ago
No, $ref(10) will return a reactive object. And 10 will be the initial value of that object.

You use the object the same way you use a js variable.

let st = $ref(10)

st = st + 1 // update it and use it like if it was just "10"

But now, st is reactive.

1 comments

Thank you for the explanation... I will have to learn a lot of basics, it looks like :)