Chapter 3
Making Vue Templates
IN THIS CHAPTER
Creating HTML templates
Passing props
Including JavaScript in templates
Adding functionality with directives
Choosing what to render
Rendering with loops
Filling in the blanks with slots
Adding component style
“Simplicity is prerequisite for reliability.”
—EDSGER DIJKSTRA
JSX templates are written using HTML syntax. When Vue code is compiled, the HTML templates are converted into optimized JavaScript code. It's also possible to use JSX instead of HTML for your templates, or even to bypass writing templates altogether by writing Vue render functions directly. However, simply writing HTML is the recommended way to bind component logic with ...
Get JavaScript All-in-One For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.