My problems with React:
- They try to push a programming paradigm, without considering that other programmers may have different or even better paradigms.
- They put too much functionality into a single framework.
- Frameworks are a bad idea anyway. It is much better to divide functionality into self-contained libraries.
- They try to redo what the web, a huge standardization effort, is doing.
- React does not fully support all HTML/CSS constructs.
Now all of this isn't really a problem right now. But if React grows and gains more traction, then it could become a problem (just like Internet Explorer became a problem after a while).
It's just JavaScript wrappers for native UI toolkits. Much in the same way there are Python wrappers, Ruby wrappers etc. The only difference between React Native and someone else's JS bindings is that React Native makes use of a virtual view hierarchy and several other React-isms - which have absolutely nothing to do with the web except in-so-far as that they were first implemented on the web.
Yes, React Native supports an API based on the web's Flexbox API, and view styling similar to CSS - but these are applied to native views. React Native doesn't implement any rendering of its own. However, if anything this is bringing web technologies to native development, they're in no way conflicting with browsers - React Native has nothing to do with a web browser.
As I said, React Native provides bindings for native UI development. Now, whether or not you think that's a good idea is up to you. Swift and Cocoa are generally pretty good, so I can see why iOS devs might steer clear. However, the Android SDK is a complete joke, React Native is significantly more efficient to develop with.
Are there any other reasons for choosing one over the other? Are they similar in terms of what you can do/the performance? With libraries like phonegap/cordova, you have to sacrifice some APIs and the resulting app may be more sluggish. I was wondering if it's the case with React Native.
React and React Native are framework/libraries/whatever made by Facebook to solve Facebook engineering problems (they're cool in the way they unashamedly only open source what they actually use).
They have their own paradigms they prefer and it works well for them and many others. Why should Facebook cater to every programmer's favorite paradigm?. You could honestly say the same thing about most frameworks—do people complain Rails makes it hard to do functional programming?
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.
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.
Not clear what you are referring to by the "many layers" or indeed the "framework".
(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)
Check out this project to see how people use React without JSX:
While it might sound redundant, it's more about making UI layout simpler, faster, and all in all more "native".
There's already plenty of browser view-based layout frameworks, and in general they run into the same limitations (performance, lack of native components, etc). This is an alternative solution to that. Think of it as a middle ground between Xamarin and Phonegap.