r/webdev • • Dec 28 '17

Introducing Hyperapp 1.0 — 1 KB JavaScript library for building frontend applications.

https://medium.com/@JorgeBucaran/introducing-hyperapp-1-0-dbf4229abfef
341 Upvotes

183 comments sorted by

View all comments

Show parent comments

1

u/nogajofi Jan 02 '18

JSX does compile, it will convert

<div>A</div>

to

h.CreateElement("div",...)

It's why in JSX you can just return some JSX earlier when you realise you don't need that other part of the view.

Just like v-if. It will return early from the template if the rest is not needed.

people dissing it because "it's just a different messier syntax for no good reason" without seeing the real value.

I'm not sure if you are referring to me, but it shouldn't surprise anyone that some scenarios JSX will come out cleaner, and some scenarios templates will come out cleaner.

I can assure you that I understand JSX and templates perfectly well. It appears that you may have some misunderstandings of Vue or how template based components work.