5 ms·
I tried using this a few months ago, as well as React Native for mobile and React Native Web for web, and I felt like they were all just hacks glued together to
by satvikpendem 7y ago
I tried using this a few months ago, as well as React Native for mobile and React Native Web for web, and I felt like they were all just hacks glued together to get cross-platform support, and RN isn't even native, it still includes a Javascript bridge. Build dependencies and packages were a nightmare, things continuously broke. I tried Flutter afterwards and it just felt like a breath of fresh air. Everything "just worked", on all the platforms I tested it on: web, iOS, Android, Windows, Mac, and Linux. Updates on one are hot reloaded to another. In contrast, Expo sometimes just broke. This was all wrapped up in one package instead of needing to use separate build chains for each platform.
I wonder if React Native can do all of this officially, but I suppose that's not their prerogative, given that RN is mostly used by Facebook for apps and these other platform efforts are by third parties, like Microsoft here.
- _bxg1 7y ago> RN isn't even native, it still includes a Javascript bridge "Native" doesn't describe the programming language, but the GUI layer. Native == non-web-browser.
- crazypython 7y agoReact Native isn't afraid to expose platform specific details when abstracting away cross platform APIs in uniform APIs. In my experience, it was fairly easy to use a native UI library inside a React Native app. (It takes more work to embed a React Native view inside a native view that's embedded in a react native view, but it's possible.)
- satvikpendem 7y agoI've seen both uses of the term "native"; it's an overloaded term. Some use it to mean "native UI", and others use it to mean "natively compiled". I meant it in the latter case. I actually prefer wholly custom UI, as most apps do these days that are cross-platform, because it allows for very interesting user experiences. Of course, some people disagree, wanting everything to be native-looking and feeling to their platform, such as Linux apps all using GTK or macOS all using Cocoa.
- baxuz 7y agoThe GUI layer in a static sense. You can't have native realtime interactions with the GUI, for instance dragging and interactive animations. You can choose one of two things: 1) Run a single precomputed action or animation in native-land when receiving an event from JS. No interaction is possible. 2) Run a requestAnimationFrame loop in JS which is passing the bridge (6 API calls on Android - 3 layers per direction) 60-120 times per second in async mode. Enjoy the jank.
- derrick_jensen 7y agoI've had the exact opposite experience, but I mostly use Java over Flutter for Android. Expo can be fairly limiting and breaks a lot, but core React Native is wonderful and does everything I need with a couple exceptions (FCM and more fine grained microphone support). I also have a dedicated Android native module for my app, and a lot of React Native libraries can probably be consolidated down to one module and directly using the Java libraries on Android. What dependencies are you using that continuously broke? Did you track your package lock file on Git? EDIT: Ive also tried React Native Web and it pretty much worked OOTB. Alerts were the only thing I found that weren't implemented, but they didn't show any runtime errors or instability
- mleonhard 7y agoWhat do you think is the main reason for the difference between your experience and the parent's?
- d0100 7y agoInstead of "Flutter", use "Flash" and you got the same thing! Except hot reload
- diegof79 7y agoI had the same experience. Expo is wonderful for prototyping and quick iteration. The ability to use Snacks online and see them working on the phone is great. But beyond that everything in RN feels hacky and unfinished. While working with it I had some silly issues with Metro, and found some subtle bugs in Text and Button components. About the "Native" part. I think that a lot of people have the expectation that doing RN apps will be the same as building a iOS or Android native app. But RN+Expo is not that different from frameworks like Ionic. Is really hard to do an app that follows the Apple HIG or Material Guidelines, you end with something in the middle that doesn't look or feels truly native (at least not without tons of extra work to imitate things that you get for free in the native UI kit) . RN without Expo is not so nice, lots of rough edges and sooner or later you'll need to write interop code in Objective-C or Android Java to take advantage of the native platform.
- WrtCdEvrydy 7y agoExpo has one small issue... if you are in an organization that isn't capable of keeping it up to date and it becomes deprecated, your app will stop working. If this happens over a weekend, expect your phone to blow up every three hours until it gets republished and fixed.
- behindsight 7y agoUnless you are referring to another issue, using `expo build:android` will create an apk file so you don't have to rely on staying up to date with the Expo app.
- WrtCdEvrydy 7y agoYeah, but if you are using their native extensions and they deprecate your version, their repo will become unavailable and your app will fail to start.
- antigirl 7y agoThat’s a massive claim to say RN doesn’t feel native without alot of extra work? Please elaborate because it feels pretty native out of the box using the standard components. It’s nothing like ionic. When is the last time you used RN? RN apps are hard to tell from native.
- distantaidenn 7y agoI've done a few client projects in the past using React Native. I get the appeal of having a "single" codebase for iOS and Android, but I absolutely detested using it. I'm quite sure and aware of people that love it, but just from my personal development background, it just never really seemed appealing to me. Definitely not a fan of how state is handled. I've rolled my own system, Redux, and a host of other solutions as well. It just all seemed unnecessarily complex. As you said, to me it just felt like hacks on top of hacks. I'll take vanilla iOS and Android development any day of the week, and twice on Sunday. With that said, and from what I've seen of Dart/Flutter, I really hope it takes off.
- ledauphin 7y agocan you go into more detail about "how state is handled"? I wouldn't have considered that to be one of the offerings of React Native (or Flutter).
- distantaidenn 7y agoWell, for a toy app, it's pretty simple, but once you begin to build real-world apps, with 30 or 40+ components, and their children, I just found passing state and props around a bit messy and hacky. Of course, then you introduce Redux, and all is well. But now you have to deal with transducers and actions, and so on. I just didn't find the tradeoff worth it, and prefer native development. I'm sure every React developer has at some point found themselves banging their head on the wall trying to figure out why some child component isn't updating. And yes, it's a personal preference, but I'm also not a fan of Javascript. If another client wants a single codebase app, I'm really gonna give Flutter a nice long look. I've read the docs, and it looks quite appealing.
- tiborsaas 7y agoCheck out React context to avoid this property passing, which is annoying, I agree. Did you know that Redux is now basically built into React? https://medium.com/simply/state-management-with-react-hooks-and-context-api-at-10-lines-of-code-baf6be8302c https://medium.com/simply/state-management-with-react-hooks-... https://blog.logrocket.com/use-hooks-and-context-not-react-and-redux/ https://blog.logrocket.com/use-hooks-and-context-not-react-a...
- SZJX 7y agoI'm kinda surprised that everything "just works" for Flutter, even on Windows and Linux, which the official documentation seems to say are still in alpha stages and might be subject to breaking changes in the future. I also couldn't find ways to easily implement things I want, e.g. native Mac MenuBar bindings/Mac App Store payment library etc. Eventually I ended up using Quasar https://quasar.dev/ https://quasar.dev/, which allows you to use one Vue.js codebase but deploy to Cordova on mobile and Electron on desktop. Vue is definitely not the prettiest solution out there, but I had to be practical and actually get the app out. Maybe I'm just one year too early for React Native/Flutter ecosystem to be developed enough for my app. The landscape is certainly changing rapidly, which is good.
- satvikpendem 7y agoYes, Flutter is useful for when you have GUI heavy apps, not necessarily ones with platform integration like menu bars and cameras, although that is progressing pretty well I'd say, people are writing plugins for platform capabilities. Regarding Windows and Linux, I too was surprised at how well everything worked. You can't build to production yet for these two platforms (officially at least, see flutter-rs for unofficial implementations), but the debug builds still work as well as the Android and iOS emulators. I used them on a lower powered machine to run my Flutter apps and it was great that they worked well.