Hacker News new | past | comments | ask | show | jobs | submit login

> React is in no way a layer over Javascript.

I was thinking about JSX here. It is translated to Javascript, so a layer, imho.

Layers are not a bad thing. What is bad is that React tries to lump together many layers into a single framework.




JSX is syntactic sugar for JavaScript.

Not clear what you are referring to by the "many layers" or indeed the "framework".


Well you can write pure JS instead of JSX if that helps. An example: https://github.com/ustun/react-without-jsx/blob/master/child...


Thanks. That actually looks better to me than JSX, and I would like to avoid transpiling JS in a pure web app.

(disclosure: I've been an Angular 1 dev for a bit over a year and only skimmed some React material, but I have also done other stuff for the last 30 years)


It might look more familiar, but it's not better than JSX. It gets really tedious to write the pure JavaScript versions of components especially when specifying lots of attributes and nested components. It's also hard to follow. Everyone I've worked with on React projects has had similar initial reactions, it just looks weird to have html inside JS. But try it out first, I'm sure you'll grow accustomed to writing JSX and the tooling built around it.


I disagree. I'm working on a large react project now and am not using JSX. I find JSX to be very ugly with all their closing div tags.

Check out this project to see how people use React without JSX:

https://github.com/jador/react-hyperscript-helpers




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: