What you need to know about React Native

As a developer I have a love and hate relationship with React Native.

What you need to know about React Native

As a developer I have a love and hate relationship with React Native.

I learnt Javascript and the MERN stack (mongo, express, React, Node) when I first studied software development. So for me React-Native was an obvious choice to get into mobile development and allowed me to start a development agency delivering our first mobile app within 7 months of starting to learn to code. This would not have been impossible in any other technology. Therefore React Native will always have a fondness in my heart.

The Good

It provides a fast way to get into mobile development and a rapid way to build apps for both iOS and Android. and the code isn’t toooo dissimilar to React so you can build a normal web app fairly quickly after that if you desire.

And of course with React Native the awkward conversation of:

‘I’ve built this great app’ → ‘Sweet let me download it’ → ‘Oh its only iOS sorry…’

Can be a thing of the past, which is great for developers and users alike. It’s great for businesses only hiring one dev instead of two and in general this is just the best reason you would use it.

Also as a developer I appreciated:

  • Hot-reloading which does make development process less of a headache (once you’ve dealt with the headache of setting-up hot-reloading)
  • Declarative style of React and React-Native is nice. Having the UI as a function of state is good way to do things and the way components are built and rendered really improved my mindset as a developer.

BUT — The grass is not as green as Facebook makes out.

The Bad

  • It is awful for debugging.
  • Things are pretty much permanently breaking. Works fine on one pc. Go to your colleagues and that isn’t the case. (note — this is the experience of several other businesses besides mine, some even abandoned using because it was taking them more time)
  • iOS and Android are different — just writing one source code for both operating systems is a myth and you need to adapt for both or you will have a mess on your hands e.g. The UX and native components between the two are completely different. Expectations of user flow and how to do basic tasks like go back and menu etc… will mess with your users head if you give them the same experience.

Despite all these things. For me as a first step I would say it was still very useful. If you are a Javascript developer certainly look into React Native being wary of my points above.

The Really Bad

However, the killer thing to make note of is not a feature of React Native, but laws regarding it’s use.

Facebook label React Native as FOSS product, but they do have a patent for the technology that announces it can be used freely by all. EXCEPT. Anyone who builds anything that could be considered against Facebooks financial interest can have their right to use the software revoked and be potentially sued.

What this means

So if your doing any kind of hobby project or a business that isn’t going to be over a million dollar you really don’t need to worry one jot. But if your piece of software becomes a big player in a major channel they are slightly interested in they can pull the rug beneath you. Obviously if you want to build the new Facebook avoid react native. But Facebook could say any number of things is in their financial interest.

  • They of course earn their money through advertising, so if your product relies on advertising they could argue your reducing potential spend of their ad buyers.
  • If you run any form of social network they can argue you reducing time users spend on their platform
  • If you sell anything they now let users sell stuff in an Ebay / Gumtree style marketplace. So selling stuff is out.
  • Well in the long run anything on any device that keeps users from spending time on Facebook they might want to challenge.

So basically play it safe and don’t use React Native until this patent changes.

Options

You can look into other frameworks that allow cross-platform development. Appcelerator runs in Javascript and has greater security or Xamarin for C# develpment. Or just learn up on Java and Swift and go fully Native for the meanwhile as I am doing.

Regardless I’m not posting the blog to sell you anything or to tell you where to go. I’m just telling you stuff you should know when considering using React Native. Happy Coding =]