Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does this actually work? When I see JS-esque code passed as a string I get a little queasy. Is this "eval"-ed so I can use real JS there? Or is there some Vue parser that reads this little mini language and interprets it? What is `listItem` exactly, and how does that template have access to the data represented by it?

When I'm trying to digest a bit of code, the superficial representation of what's present on the page is only half the battle - I also like to understand what it's doing under the hood. For me, then, JSX is way easier to grok than this bit of code, since I have a mental model of how JS works, and JSX is just a very small serving of syntactic sugar to compile an HTML like template into native JS. I know the transformations that are happening, and I can envision the code that it's being transformed into.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: