3 ms·
> React is just a very thin layer on top of JS/HTML React is in no way a layer over Javascript. React is just an API to write UIs with pluggable backends. The
by owaislone 10y ago
> React is just a very thin layer on top of JS/HTML
React is in no way a layer over Javascript. React is just an API to write UIs with pluggable backends. The backend can be HTML, HTML Canvas, iOS UIKit, Android widget toolkit, Winforms, GTK, QT, etc etc. It's just a higher level API for writing UIs in Javascript. It's not a platform for application delivery. Browsers and application run times + stores on iOS/Android/Ubuntu are are platforms for application delivery.
React is not even a framework. It's just a library which you can include in your bigger framework.
> - They try to push a programming paradigm, without considering that other programmers may have different or even better paradigms.
Programmers who don't like how React works can use something else. There are lots of choices out there. Angular2, om, cyclejs, mithril, ember, backbone are some of the choices. You make it sounds as if React is a browser with a limited set of APIs.
I'm not saying React is perfect but the arguments you make are totally invalid IMO.
- amelius 10y ago> 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.
- hexasquid 10y agoJSX is syntactic sugar for JavaScript. Not clear what you are referring to by the "many layers" or indeed the "framework".
- owaislone 10y agoWell you can write pure JS instead of JSX if that helps. An example: https://github.com/ustun/react-without-jsx/blob/master/child.js#L6-L11 https://github.com/ustun/react-without-jsx/blob/master/child...
- Roboprog 10y agoThanks. 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)
- wayfarer2s 10y agoIt 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.
- qudat 10y agoI 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 https://github.com/jador/react-hyperscript-helpers