My Second Take on React Native

Written by Arvind

I learned a lot by doing just this two pages react native project. It’s a battle when studying a new language, framework or library. You have to understand how the things connect, work and behave. It’s also different when you’re just watching a tutorial or reading a book/blog than doing it actually.

Dive Right In

Sometimes it’s a good idea to dive into the sea of React Native and start swimming, but if you have more time, I would study React first, then when you have a better understanding of what’s going with the framework, go and jump into React Native.

Getting MAIN.JS Get Going First

By default, when you create a new project in React Native, you get IOS and Android in a separate file. This really good if you want a different look and feel on each platform, but if your planning to use one design for both platforms, it’s better to create one file and calling them in each platform.

MAIN.JS
'use strict';
import React, {
  Component,
  StyleSheet,
  Navigator,
  View,
  Text
} from 'react-native';

module.exports = class StaticPizza extends Component   {
    //CODE GOES HERE
}
INDEX.IOS.JS and INDEX.ANDROID.JS
'use strict';
import React, {
  AppRegistry,
  Component
} from 'react-native';

import Main from './src/main';

AppRegistry.registerComponent('StaticPizza', () => Main);

I like this module, exactly what I was looking. This is really great if you’re leaning towards ios development. It’s easy to use and flexible.

GITHUB Link: https://github.com/react-native-fellowship/react-native-navbar

Styling and Flexbox

At first, Flexbox can be tricky, challenging and frustrating sometimes, but once you get to know it, its really cool. I like that REACT is limited when it comes to styling, just what you need to make a really good looking APP. They say “but out of limitations comes creativity” which is true.

I will try to explore more on React Native and build some small project on it. Hopefully, publish one or two this year if time permits.