Hi there to all of you! Today we are going to introduce the newly released command line tool for building and testing really easily React native apps: create-react-native-app. This tool is the equivalent for create-react-app of Facebook! With this build tool you can setup a “Hello world” app in no-time! I tried it and it works! I started making a mobile app with React Native which will be like a news feed or a mobile version of my blog! So, with this app I managed to retrieve the 10 first blog posts and display them to the screen of my phone! Due to the fact that I am still not familiar with the different components of Android and/or iOS I will share any code in this post. I am still trying to figure out things myself.
For detailed instructions on how to do things and run your development server or if you want to install your app in your phone you should visit this link: https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md
Although, to be honest with you I still can’t figure out how to install the APK file after publishing to Expo standalone app service!
The only caveat I find using this great tool is that I do not think I managed to overcome the very complex nature of React native development for real! What I mean is that I tried making my blog app with both ways:
react-native init AwesomeProject && cd AwesomeProject && react-native run-android
and the new one:
create-react-native-app my-app && cd my-app/ && npm start
Using the former I cannot understand exactly how it works, because each time I do not see the app immediately as they say in the Facebook setup page you will see with the command: react-native run-android. I always have to type:
so as to actually run the app in my phone etc. I think the tutorials are not quite clear or updated a lot. Things change pretty fast in the area and nobody can keep up with no hurdles!
As regarding the latter, a caveat is that you have to install an app in your phone called Expo! Although this is super, I would love not to use its environment every time I want to build something. I even published my test app in the standalone service website they own, but to be honest I did not see any IPA/IPK file to download only a huge button saying:
OPEN IN EXPO APP (binding the URL of the published app to my newly registered Expo account)
From reading the instructions in the page for standalone app someone expects some file download or sth! Didn’t see any as I mentioned before! The result was, instead of having to run the commands every time in the terminal to produce the QR code and scan it, I now have my app on my account so I can click on it any time I want and run my app! To be honest this is not something I was looking for: I thought I could install the .apk directly on my device!
Quick note: I haven’t tried the npm run android command which runs the app in the Android simulator etc.
Despite all these confusing ways to make a mobile app, the work that has been done with React Native is absolutely amazing! This new build tool I think will help a lot of people get into mobile development relatively smoothly and get familiar with the ins and outs of it.
Regarding my own level of knowledge about the subject, I have to admit I really “suck”! I am still trying to find out what goes where and which tool is for which job and always bumping on bugs and errors, so my mobile experience so far is hectic and slow! I am confident though since everything in programming requires its time and consistent efforts to get it, that soon enough despite the steep learning curve I will have my app up and running smoothly.
But for the time being, Cheers! and happy mobile development with React Native!
PS: Dear Lord, I just thought about updating or upgrading your apps! This should be tough taking into account that even making a simple app is currently difficult! Let’s see how it goes in the near future!