Re:New Features in Vue 3
by mpolichette on Wednesday October 30, 2019 @07:58PM
(#21404349)
So, when the jsx is compiled for react onClick={foo} is really just part of an object: `{ onClick: foo }` which is actually using the token.
Believe me, I agree to an extend its a matter of taste, but I too like that my underlying understanding of whats happening under the hood can be followed by a raw debugger without following string based mappings.
In react I can set a debugger endpoint right before the return of render and see what all my local variables are... is anything like this possible in vue?
I agree with you on the preference part. I share the same preference as the GP. I've played a bit with Vue in the past, at the same time I was testing React. I've enjoyed Vue but the strings and template were a grim reminder of the Angular not-so-fun-times and passing members around per-reference and not "per string" made more sense in the general JavaScript way of programming, and so I ended up sticking with React.
Even with tooling support, those strings still make me wanting to look away...
The same is of course true for Vue. At runtime, it will spit an error if it doesn't know that token (variable, function, whatever it is).
My feeling is what you don't like are really the quotation marks because it looks weird. I had a similar feeling when I started with vue. However, it is really a matter of taste if you prefer the Vue @click="foo" or onClick={foo} syntax.