Live data from Hacker News

Ask HN: Front End Development 2022

news.ycombinator.com

21–22 of 22 posts

Re: Ask HN: Front End Development 2022

#21
post #19

Earlier quoted context omitted.

I also use Vue. It's got good docs, a decent amount of plugins, etc. But the main thing is that it doesn't make me use Jsx for HTML. Jsx in my opinion just creates ugly view files which are massively more complex and harder to read than they really should be.

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

I feel like if your views are complex, you're probably doing something wrong. Views really shouldn't have complex logic in them.

Re: Ask HN: Front End Development 2022

#22
post #19

Earlier quoted context omitted.

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

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

Post reply on HN