Hacker News new | ask | show | jobs
by rk06 1279 days ago
JSX gives you a powerful way to describe your html. But template is easier and gives more opportunities for optimizationa.

I like that Vue has chosen to use templates as default and supports jsx for complex use case.

This way advanced use case can leverage the power of jsx while most common scenario can use html

1 comments

I feel like if your views are complex, you're probably doing something wrong. Views really shouldn't have complex logic in them.
It is just like Reflection. Usual business logic should not use it, but all complex libraries (ORM, MVC, Dependency Injection) use Reflection and won't be ergonomic without it.

Same way, the jsx is advanced API. You will have complex logic, when you are authoring super reusable components for a variety of use cases. And jsx helps you in making it possible.

While allows you to use simpler approach for rest of the codebase