3 ms·
Not a Vue programmer, but looking at the code, why is the example code using {{ count }} instead of standard JS interpolation like ${count}, and using an App.te
by Androider 7y ago
Not a Vue programmer, but looking at the code, why is the example code using {{ count }} instead of standard JS interpolation like ${count}, and using an App.template block instead of just returning the template with the count and other params. E.g. why not just make it plain JS, and minimize framework surface? I could rewrite that example removing almost all of the "Vueisms", and it wouldn't be a single line longer.
- Roboprog 7y agoOutput encoding Js template strings insert any text as is, rather than encoding HTML special characters to avoid injection exploits
- Can_Not 7y agoSingle File Components are converted to functions at build time (not run time) and that's the syntax for "string interpolation, but the variable is not trusted html". This protects against html injection.