LIGHT DARK BLOG HOME
GITHUB LINKEDIN EMAIL

LIGHT

DARK

BLOG

MENU

Should you learn React Native?

Arjun Aravind 2 July 2020 5 min read React Native is one of those things that you hear suddenly hear a lot of devs talking about. It's one of those 'cool' things to learn. But is it actually worth learning? Even if you've not really thought of mobile app development, should you take the time to see what it's all about?

Well, to be brief, yes. Yes, you should.

That's what we're going to be talking about in this article. More specifically:-
Should you learn mobile app development?
The field of mobile app development has always been one which requires specialised developers. And for good reason. Being an app developer in the modern world requires you to be good in both the iOS and the Android developmental platforms. I tried learning a few years ago and it's some really difficult stuff.

The learning curve is really huge too. To be good at both iOS and Android, you need to learn some combination of Swift, Objective-C, Kotlin and Java. But hang on, I have to learn all this for making an app? No way, I'm good with making a mobile website which works on all browsers, thanks a lot.

BUT WAIT! With the advent of cross-platform mobile development platforms such as React Native, Flutter, Xamarin and Apache Cordova, the learning curve is gradually flattening (yes, that was a Coronavirus reference).

The only issue with all of these solutions is that they're not as performant as apps written in Kotlin/Java or Swift/Objective-C. But there's a good chance that future framework optimisations might better the situation.

In any case, mobile development, due to its accessibility and ease-of-learning is fast becoming one of those things which everyone is starting to learn. It's essentially an essential (tongue-twister, hehe) nowadays.
But why React Native specifically?
React Native - the future?
React Native, I think, is really good primarily because it employs Javascript as a language. Now, Javascript is a pretty popular language and is really easy to learn also. Chances are that most of you reading this blog might already know a bit about it. If you don't, click here.

I haven't worked with Flutter at all but from what I understand, it is not as mature as React Native and, well, you have to learn Dart, whatever that is.

Xamarin, no way. I've worked on it before and I absolutely hated it. Nothing makes sense in it and I don't even think it's free. The toolchain for Xamarin is pretty good but really eats up memory and space on your computer. Just because it's from Microsoft doesn't make it good.
Me running as far away as I can when I hear the word 'Xamarin'.
Apache Cordova seems nice but it basically builds apps with a webview. This means that you're app is actually rendering HTML files and is behaving as a browser-of-sorts. This is fine if you want to just build an app as fast as possible but it will suffer from UX issues.

Okay, at this point it seems like I'm advertising for React Native. But no, take it from me, a person who at one point never wanted to build mobile apps after that horrible Xamarin experience and then got to use React Native at work. It's really easy to use and it has an excellent set of development tools built around it.

When it comes to development, you can use any text editor you want. If you're a beginner, you can try out Expo, which makes using React Native even more easier. It does a lot of your work like configuration and setting up a development environment for you.

One nice feature when using React Native with Expo is 'hot reloading'. This means that, as you type, your changes are reflected in your phone or emulator. There's none of that save-compile-build stuff (Phew!).
Are you a web developer? Awesome!
Even if you know a little bit of web development (basic HTML and CSS), then React Native might be more intuitive for you. Check out this comparison where we achieve the same thing in HTML/CSS and in React Native.

In HTML and CSS.
<p style='color: red, font-size: 50'>
	"Luke, I am your father!"
</p>

In React Native.
function App () {
	return (

		<View>
			<Text style={{color: 'red', fontSize: 50}}>
				"Luke, I am your father!"
			</Text>
		</View>

	)
}

So, for React Native, you have to add a bit more code after that, but, on the whole, it's pretty similar, right?

Here's another example in HTML and CSS.
<p onclick='showMessage()'>
	Click me!
</p>

<script>
	function showMessage() {
		alert("This is some HTML");
	}
</script>

The same thing in React Native.
function App () {
	return (

		<View>
			<Text onPress={() => showMessage()} >
				"Luke, I am your father!"
			</Text>
		</View>

	)
}

function showMessage() {
	alert("This is some React Native!");
}

Where can you learn it?
The best place to learn any framework is definitely the documentation. The React Native Documentation is so good! It's designed really well, is very informative and, most importantly, has lots of examples!

I wouldn't recommend any online courses as React Native is a pretty fast-evolving technology and many courses don't keep pace with it. The ones I tried seeing were really outdated even though they were only from a few years ago. In any case, the documentation and Stack Overflow should keep you going!

Really hope this helped!