Hacker News new | ask | show | jobs
by CaveTech 3103 days ago
You can use slots to pass HTML or Components into child components.

You can have vue render jsx or templates, but in practice you can make interactive components very simply using templates which are foundationally simpler and easier to grasp than JSX.

1 comments

How so? In my mind templates and JSX are equally complex from a user standpoint. In fact I'd argue that JSX is simpler because you don't have to invent slots -- it's an obvious side effect of using JavaScript to generate your structure.

Just reading about slot and slot-scope makes me think Vue's reputation for simplicity is overblown.

It may seem "obvious" to you after being in the water with JSX for a while, but the free-style abstractions afforded by being 'just' JavaScript, like the one you mention, look incredibly complex for someone approaching an unknown codebase.