6 ms·
As a more backend guy who does some frontend, the main thing I like about React over alternatives like Svelte, Vue and SolidJS is React Native. React is maybe n
by yashap 4y ago
As a more backend guy who does some frontend, the main thing I like about React over alternatives like Svelte, Vue and SolidJS is React Native. React is maybe not perfect for the web, but it’s very, very good, and it’s also quite good for mobile via React Native. The more purely web-focused libs/frameworks have far inferior (or no) mobile options, while other cross-platform frameworks, like Flutter, suck on the web.
Being able to use such similar concepts/knowledge for both web and mobile, with strong results in both places, that’s something React is uniquely good at (AFAIK), and a huge reason to choose it IMO.
- Semaphor 4y agoPeople seem to say Quasar [0] (a framework on top of Vue, websites, PWAs, mobile, desktop) is great in that niche, but I can only say that their documentation looks good. [0]: https://quasar.dev/ https://quasar.dev/
- yashap 4y agoInteresting, have never played around with it. Is it just a WebView on mobile, though? What I like about React/React Native is that it’s web-native components on the web, mobile-native components on mobile, so you get true native look/feel/behaviour in both places. Too many of the alternatives are WebViews on mobile, basically just a web page embedded in an app. Or they do crazy things on the web, like Flutter turning your webpage into a giant canvas. React/React Native is the only popular/mature approach I’ve seen that embraces native components on both the web and mobile, though maybe there are others?
- Semaphor 4y ago> Is it just a WebView on mobile, though? Checked, yeah. Using Cordova or Capacitor. They say it looks native, though? No idea. > What I like about React/React Native is that it’s web-native components on the web, mobile-native components on mobile, so you get true native look/feel/behaviour in both places. Oh, that is cool. I never worked with anything mobile, so I didn’t know. I will read into that, not that I plan to use it, but it sounds interesting :D
- HeavyFeather 4y agoIs React good on mobile or does it just have a good solution there? I don’t think anything is stopping vue-native from popping up other than interest and someone to work on it.
- yashap 4y agoSee my comment here with more about my take: https://news.ycombinator.com/item?id=35066431 https://news.ycombinator.com/item?id=35066431 But React/React Native is the only mature/popular web/mobile approach I’ve seen that embraces web components on the web AND mobile components on mobile, which I think is a big advantage. Though maybe there are others I’m unaware of! I’m sure there could be React Native like solutions for other libs/frameworks, but I haven’t seen any that are as mature with the same “native components under the hood” approach.
- agloe_dreams 4y agoTLDR: React Native sounds incredibly awesome until you are 5 years and 150 devs into it and realize that this shit sucks. But hey, if you are under 10 people and need apps everywhere, it is a nice thing.
- yashap 4y agoYeah, if you have a big team, everyone is going to be specialized anyways. You can have: - Dedicated Android devs working on your Java/Kotlin/whatever Android app - Dedicated iOS devs working on your Swift/Objective-C/whatever iOS app - Dedicated web devs working on your JS/TS/whatever web app - Dedicated BE devs working on your BE services, in 1-many languages that may be none of the above But for startups, that’s not gonna happen, there’s gonna be wayyyy fewer devs and wayyyy less specialization. A lot of companies will be in that mode for many years, possibly indefinitely. In those situations, React Native can be a big win. I’ve been working the past 2 years at a relatively small startup, ~10 devs, that’s TypeScript everywhere. We’ve got 2 mobile apps (mobility space, a Rider and Driver app), both TypeScript/React Native/MobX. Rider is iOS/Android/web, Driver iOS/Android, very nice having 2 apps instead of 5. Then a web-only admin app in TS/React/MobX, and backend services in TS/Express. Same language everywhere, and similar mental model across all FEs, is a big productivity boon at our size.
- paradite 4y agoI'm using React Native to build mobile games, and I am pleasantly surprised I can just write my own state management and update logic (hack around states and props) to walk around a lot of issues and get good performance.
- Firmwarrior 4y agoIf you hack around the state management and update logic, what is React bringing to the table? Just the cross platform widgets?
- SgtBastard 4y agoThose same workarounds could be still be multi-platform (Android and iOS) and if you’ve got any sort of complexity in your business logic you don’t need to implement and test it in JS/TS + Swift + Kotlin, just JS/TS
- redbar0n 4y agothe rendering, which could easily be tied into the game loop. e.g. https://www.youtube.com/watch?v=uJRXJxsvj7Q https://www.youtube.com/watch?v=uJRXJxsvj7Q
- mollerhoj 4y agoInteresting, how are you drawing graphics? Skia?
- WA 4y agoIonic gives you a solid base for mobile and the web with a slight bias towards mobile. It's all web components, no native renderers, but quite polished, because it's been around for a while. Imho, you can get quite far with it.
- pcthrowaway 4y agoThere is also https://svelte-native.technology/ https://svelte-native.technology/ (and I suspect similar projects for other frameworks) though I haven't used any of the "* Native"s
- yashap 4y agoOoh interesting! Similar to React Native in that it’s a JS interface to native components, didn’t know about this, worth a look!
- TheMagicHorsey 4y agoWhen did you last use Flutter on the web? It has some quirks but it does not "suck" in my experience.