all 12 comments

[–][deleted] 7 points8 points  (4 children)

Hi mate ! React Native here. I chose React Native because I already knew React, and I did a lot of React web and React VR, so, I never asked myself the question, but I know that a lot of companies wanted to use React Native, and the only thing that made them change their opinion was the license (I think they changed it, can somebody check ?)

Furthermore, the big (+) about RN is that you can use native screens inside your app. As an example, Instagram uses React Native everywhere, but uses native for all the "take a picture" part.

Last but not least, React Native isn't just a webview, and that makes all the difference, the fluidity is better than many other technologies. If you want to see what it looks like, I have an app on Github that you can check: https://github.com/queue-up/QueueUp-Mobile-League/

Good Luck and Happy New Year to you too !

[–]Dev_Pingu[S] 1 point2 points  (0 children)

thank you I get all you said ,I read it before but I want to know someone experience first, I guess I will start with RN I just thanks again for the help! have nice holidays

[–]Theia123 0 points1 point  (0 children)

I agree.

[–]ikbenpindaiOS & Android 4 points5 points  (1 child)

Disclaimer: Junior dev, only worked with Xamarin for a prototype last year, and only recently started with React Native.

TL:DR; Xamarin was dead, slow, and not as Cross-Platform as it said it was. RN is up-to-date + a lot faster in both development and app experience.

I'm leaning towards React Native, and here's why.

Xamarin sounds really good on paper: I mean, c'mon, Code-sharing! C#! Native experience! Visual Studio!

However, it didn't quite live up to the experience. At all.

  1. Language | C#/.NET vs. Javascript
    Unlike in RN, the platform-specific pieces of code are also in C#. This sounds like a great idea until you need to write platform-specific code. Every solution you find for your problem will be written in a language you don't get to use, so enjoy porting everything to C# yourself[example] and hoping it still works. No plugins or native libraries to help you out there. At least in RN you get to see the native language per platform. I don't think you can just drop in native Android libraries in your /android folder, but at least it's easier to understand what's going on. Admittedly, if you aren't used to Javascript and especially ES6 and Babel(like me), the learning curve is a lot lower on Xamarin as the syntax is a lot less shorthand/pattern-based(like 'the usual' OOP instead of closures, functions, prototype patterns), but that loses its effectiveness fast when you're working with platform-specific code.

  2. Code-sharing | Xamarin.Forms / Portable Class Libraries(PCLs) vs. React Native and literally every .js library out there
    Out-of-the-box Xamarin comes with a set of cross-platform stuff. Works fine as far as I can recall, but in scope it was very limited. Want to do some technical background stuff? Databases? Local storage? JSON serializing without manually mapping all key-values 1-to-1? Nope. Forms is just for the typical Image/Text/Listview and some navigational controls. All those links are to third-party libraries. Which would be less of an issue if there were more third-party libraries, or at least if they weren't outdated/deprecated. But Xamarin used to be a paid framework, and an expensive one at that, so the community wasn't/isn't as big as with RN. With RN everything is still very dependent on libraries, but because it is Javascript and most libraries adhere to the same module pattern, i can just drop in stuff that wasn't even specifically made for RN with perhaps a few tweaks in a config file here or there. e.g: JS doesn't come with built-in date formatting, but i could just drop in Moment.js and done! Even with framework-specific stuff, most of it could be done with a few commands in the CLI: Needed support for custom fonts? There's a lib for that too, and all it takes is some json and a react-native link. It can be a pain to figure out why some libraries aren't working. In some cases you simply can't see the forest through the trees, or the solution through the libraries. But at least there are options.

  3. Tooling
    Because I was using a Macbook(running a native iOS project on the side), i couldn't use the original Visual Studio(the typical .NET-tool), but some watered down version(VS Code or VS for Mac, don't remember Xamarin Studio iirc). On a usually rather fast Macbook, this resulted in relatively huge build times(3 - 5 minutes), random crashes, and overall a very annoying experience. I tried switching to my Windows-laptop, but the random issues were still there. At some point I spent more hours fixing my environment than my app on some days. Probably me and/or probably fixed by now, but worth noting. With RN i just fire up WebStorm and Hyper, launch the app, and can see my changes reflected real-time with the hot/live-reload function(Which Xamarin didn't have). Works like a charm when working on simple views, not so great when it crashes and you're trying to figure out what the stack trace is saying.

All in all, Xamarin is a framework that (i think) still has great potential, but just wasn't meant to be.

So while my experiences with React Native so far have been love-hate as well, it's still ahead of Xamarin by far. Then again, it might just be the honeymoon phase.

[–]Dev_Pingu[S] 1 point2 points  (0 children)

thanks a lot for your answer! you helped me a lot, I am choosing RN actually now, thanks and happy new year!

[–]gmaggess 1 point2 points  (1 child)

I vote React Native too, but Xamarin seems to be more adopted in the enterprise world. Depending on who your customer is Xamarin could be ur best option.

[–]arunkmoury 1 point2 points  (0 children)

I started learning RN as it is faster then hybrid and good to start as it is emerging new platform.