4 ms·
> That said, in React, if you were to mess up a 'token', the runtime would be very upset The same is of course true for Vue. At runtime, it will spit an error
by ktpsns 7y ago
> That said, in React, if you were to mess up a 'token', the runtime would be very upset
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.
- teniutza 7y agoI 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...
- mpolichette 7y agoSo, 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?