Sounds like React Native causes more work then necessary. Business logic can be easily shared between different platforms, Android, macOS, Windows and iOS. Always the most time is spend to make the app behave right for each platform, so that’s only bit which differs. I am happily writing apps in Swift for Android and iOS
How Discord achieves native iOS performance with React Native
11–20 of 115 posts
Re: How Discord achieves native iOS performance with React Native
#12I recently tried to start a react native / typescript project, but the ecosystem confused me a lot. The various different tool recommended to create a project, some project templates not even compiling, the tons of different utilities required to process source files.. All that and not a single reliable source of documentation, made me feel it would be a real nightmare to maintain on the long run.
There has to be a better way to write mobile applications. Is that Ionic? I don't know.
Re: How Discord achieves native iOS performance with React Native
#13Sounds like React Native causes more work then necessary. Business logic can be easily shared between different platforms, Android, macOS, Windows and iOS. Always the most time is spend to make the app behave right for each platform, so that’s only bit which differs. I am happily writing apps in Swift for Android and iOS
The Swift for Android and iOS makes sense but how do you "easily" share same business logic between those other different platforms?
Re: How Discord achieves native iOS performance with React Native
#14Sounds like React Native causes more work then necessary. Business logic can be easily shared between different platforms, Android, macOS, Windows and iOS. Always the most time is spend to make the app behave right for each platform, so that’s only bit which differs. I am happily writing apps in Swift for Android and iOS
Watching some videos illustrating writing iOS React Native apps using Clojurescript, with REPL changes updating app display in real time (well, "live") is what makes me interested in RN. Were it not for that, I don't see why Swift is such a bad thing. I know that maintaining two separate code bases for iOS and Android is theoretically bad, but I imagine if the apps are architected well it shouldn't be such an issue.
I'm not sure _why_ this should be theoretically bad. It depends what you're going for, of course, but cross-platform GUIs are typically... not good. There's a lot to be said for separate GUIs with shared business logic IMO.
Re: How Discord achieves native iOS performance with React Native
#15For us at Standups[1] RN has been just instrumental. As a small team, we are able to ship features, just like Discord, vertically all across the stack. Having 1 language in common (TypeScript) all across your stack is the best for small teams/startups. We share most of our code.
For those of you interested in how to share code vertically using TypeScript[2], check out this guide by Bruno Lemos, super helpful, great value there for startups and especially tech solopreneurs.
[2] https://dev.to/brunolemos/tutorial-100-code-sharing-between-...
Re: How Discord achieves native iOS performance with React Native
#16I could understand if they used the same app for both platforms (like they do with their Electron app, which is also not as good as Ripcord), but since they have a native app for Android...
Re: How Discord achieves native iOS performance with React Native
#17I recently tried to start a react native / typescript project, but the ecosystem confused me a lot. The various different tool recommended to create a project, some project templates not even compiling, the tons of different utilities required to process source files.. All that and not a single reliable source of documentation, made me feel it would be a real nightmare to maintain on the long run.
You are right. This is part of what made me try Flutter for a new app over RN. While it isn't perfect (no tooling is), the initial user experience is pretty good and the documentation is constantly updated as the product matures.
Re: How Discord achieves native iOS performance with React Native
#18I recently tried to start a react native / typescript project, but the ecosystem confused me a lot. The various different tool recommended to create a project, some project templates not even compiling, the tons of different utilities required to process source files.. All that and not a single reliable source of documentation, made me feel it would be a real nightmare to maintain on the long run.
You are right. This is part of what made me try Flutter for a new app over RN. While it isn't perfect (no tooling is), the initial user experience is pretty good and the documentation is constantly updated as the product matures.
- write once and compile all business logic (and server and fs i/o ideally) into a portable independant libray, either in something that compiles to C, or wasm (once it’s more mature)
- write native UI code using native tooling, and call the business logic library from there.
But i haven’t settled yet on the ideal PL to write that library and have it interface easily on both android and ios.
Re: How Discord achieves native iOS performance with React Native
#19Earlier quoted context omitted.
You are right. This is part of what made me try Flutter for a new app over RN. While it isn't perfect (no tooling is), the initial user experience is pretty good and the documentation is constantly updated as the product matures.
I understand they are using the Dart langugage? Was it hard to master?
Re: How Discord achieves native iOS performance with React Native
#20I recently tried to start a react native / typescript project, but the ecosystem confused me a lot. The various different tool recommended to create a project, some project templates not even compiling, the tons of different utilities required to process source files.. All that and not a single reliable source of documentation, made me feel it would be a real nightmare to maintain on the long run.
You are not wrong. It is a nightmare to maintain, and if you already took the leap you best keep that project updated as soon as possible or you will be fucked beyond repair. There has to be a better way to write mobile applications. Is that Ionic? I don't know.