Re:Why I left React for Vue
by mattigames on Wednesday December 26, 2018 @12:42AM
(#18760799)
An IDE doesn't have to guess anything, if the string is preceded by v-if then is code, that's it. Pretty much how a string literal inside eval() could be parsed as code.
[ Parent
| on HN ]
What if another library uses v-if? Or there's no library loaded at all? What if I just wrote a new library that uses c-if? I imagine most IDEs approach this by looking at the string and trying to guess whether it's HTML code or not.