5 ms·
So iOS, Android, macOS, UWP and now Ubuntu. Awesome to see vendors like MS and Canonical jump in to bring React Native to their platform. I'm looking forward to
by pluma 10y ago
So iOS, Android, macOS, UWP and now Ubuntu. Awesome to see vendors like MS and Canonical jump in to bring React Native to their platform. I'm looking forward to seeing universal component sets that make it easy to develop cross-platform desktop apps.
- cel1ne 10y agoI wrote a library, react-native-style-tachyons[0] (based on tachyons.css), which makes it easy to have at least consistent styling for react-native. I think this is a good thing for shareable components, as they would have consistent spacing etc. [0] https://github.com/tachyons-css/react-native-style-tachyons https://github.com/tachyons-css/react-native-style-tachyons
- pluma 10y agoI'm not really talking about styling, more about the same kind of abstraction you get for Android vs iOS: common components are exposed as the same "universal" component that will render as the specific one on each OS and OS-specific ones are instead used directly.
- mountaineer22 10y agoThis was cross-platform too: https://en.wikipedia.org/wiki/Swing_(Java) https://en.wikipedia.org/wiki/Swing_(Java)
- mtrimpe 10y agoNot in the same way though. Swing drew and managed its own widgets using cross-platform Java. React Native uses native widgets and drives them from cross-platform JavaScript.
- mountaineer22 10y agoI find your comment incredibly insightful. Wonderful. Thank you.
- DoubleMalt 10y agoIn that React Native is more like SWT (also not entirely joyfult to work with)
- _asummers 10y agoIt was also highly stateful and was unpleasant to use, neither of which are problems with React. I do mostly backend, but I do code review on all our front end code, and it really seems to be close to the right abstractions for building good UIs.
- Drdrdrq 10y agoIMHO it was actually quite easy to use and had very sensible abstractions, however it failed to look good anywhere. SWT was much better in this regard (but much less fun to use).
- duaneb 10y agoIt was straightforward to use. I wouldn't call it easy by any stretch of the imagination--you're still trapped into Java-style callbacks. It also has all the classic problems of event loop oriented frameworks, meaning you're manually managing massive state machines. IIRC there was no attempt to assist organizing the data flow across user actions except via traditional threading coordination mechanisms.
- beagle3 10y agoWhat other coordination mechanisms do you have in mind? (assuming closureless/continuationless languages like Java or C++ pre 14)
- duaneb 10y agoWell, I wouldn't use a closureless/continuationless language for a UI except as a platform for a higher language. This is 2016 and the lack of such primitives are absurd. For the time, Swing was pretty good. Things have moved on and now data flow and state management are primary selling points—see things like CoreData (I'm not really aware of anything like it in other languages) or two-way binding that's prevalent in javascript libraries. This by no means solves state management but I think the primitives are easier to reason with.
- 10y ago
- pluma 10y agoSwing is cross-platform in the sense that "HTML5" (i.e. HTML-plus-JS-plus-CSS-plus-Web APIs in a browser) is cross-platform. The "Native" part about React Native refers to React Native using native components of the operating system (like SWT, I think?).
- dfabulich 10y agoIt still doesn't work on older Windows, which seems like a glaring omission to me. Windows 7 remains the most popular version of Windows; UWP runs on Windows 10+ only.
- mwcampbell 10y agoAll of the official ports of React Native are targeted at mobile or touch-first platforms. (I consider the UWP and Ubuntu ports official in that they come from Microsoft and Canonical, respectively.) Only the unofficial Mac port can truly be said to target a desktop platform. What underlying toolkit would a Windows desktop port of React Native use, anyway? WPF? Old Win32?
- JaRail 10y agoMicrosoft has already answered this. Their React Native target for the windows desktop uses UWP. Microsoft is pushing UWP as a capable desktop platform. AFAIK, they aren't ending support for their other platforms just yet. WPF is still being worked on last I heard. If you look at win10+, UWP is a perfectly valid choice for React Native. You could have React Native targets for WPF, win32, etc etc if you wanted.. I'm not sure what use cases could benefit from that though. Keep in mind, if they're missing something in UWP that they need for React Native, they can add it to UWP.