Re:Vue 3.5 – The Vue Point
by euoia on Wednesday September 04, 2024 @02:47AM
(#41442585)
The .value thing is dreadful. Is it really necessary? I still prefer options API.
[ Parent
| on HN ]
Re:Vue 3.5 – The Vue Point
by lloydatkinson on Wednesday September 04, 2024 @03:03AM
(#41442683)
It really is awful and smells of leaky abstraction.
Now that this is the recommended way of writing Vue, I’d be really interested in your opinion on React.
Compare the “ref” in Vue with useState hook in React.
With the useState you get back two items: the value, and a setter.
Now every time you access the value you simply access it like a variable because it is.
That's because the return value of useState is a different thing from Vue ref, and the way code is run for each component (reactivity cycles etc) is completely different.
Sigh, I wish people put some effort in actually understanding these things before posting opinions.
Re:Vue 3.5 – The Vue Point
by lloydatkinson on Wednesday September 04, 2024 @08:48AM
(#41445019)
Why are you under the pretence I don’t know the difference? I clearly know the difference.
I’m discussing the ergonomics of the API and its resulting DX.
Sigh, I wish people put some effort into actually reading the thing before posting opinions.