Codementor Events

Build React Native WordPress App [Expo way] #1 : Getting to know Expo

Published Feb 16, 2020
Build React Native WordPress App [Expo way] #1 : Getting to know Expo

This series intends to show how I build an app to serve content from my WordPress blog by using react-native. Since we successfully build an app on the React Native CLI path., for the next step, we try to develop this app again but using Expo. We will discover the Expo ecosystem that makes our lives comfortable and help us avoid dealing with Native modules to learn how to deal with WordPress APIs. Here, the most prominent features talked about in the book are the dark theme, offline mode, infinite scroll, in-app purchase, and many more. You can discover much more in this series. this inspiration to do this tutorial series came from the React Native Templates from instamobile

intro

this chapter I just curious if we do app on Expo our workflow should be fast then using CLI, we will start with explore Expo ecosystem ability and limit and finishing with create Expo app

getting to know Expo

expo is development environment that build upon React native the main goal is help developer who want to avoid dealing with Native module Expo create comfortable layer eg. push notification server ,Over The air update also help your publish app to Appstore and Play store that only your need to do its write only javascript part sound good right but anything have limit Expo not cover every native module your should study carefully

Who be-hide Expo

Expo found in 2015 by Charlie Cheever co-founder of Quora, former software engineer manager as Facebook the company is self-funding from many investors like Ycombinator, Pual graham, SV Angel

element of Expo

  1. Expo client app this app help us deploy app on development workflow insanely fast
  2. CLI tool help your take action from command line
  3. Snack the IDE on the browser help your develop the app in the browser without any installation
  4. Expo SDK this superset of React native package that allows your using over 60 Native Module without touching Xcode or Android studio

manage and bare template

Expo provides two app template Mange and Bare for Manage template Expo covert all every aspect for bootstrap, build, deploy, update but second is Bare template is pain in this ass if Expo doesn’t support Native module that your want to use like in-app purchase your need to eject app to bare model and can’t avoid touching Xcode and Android studio

create expo project

first, your need to install Nodejs and one of emulator or hardware device that install Expo app search on store that easy to install using expo-cli for development workflow

npm install expo-cli or yarn add expo-cli

then create a new expo project with

expo init krissapp

now we are going to choose to manage workflow first that we will learn eject process later

next thing we  open our project in Vscode then open terminal again and run

expo start

if your want to use emulator choose one of the Android or iOS or both if your have ram 16 GB or more than I was accepting use real device that already installs Expo client and has three-way to connect using tunnel,lan and local network next thing use camera on your phone read QR Code below

boom we got the first look of Expo app

and your will see everything from start to run new app consume time and resourceless than using React native CLI

Conclusion

the first chapter will be done your know intro to every element of Expo also set up everything that ready for developing our WordPress client app again for the next section. We will use React navigation version 5 for bootstrap screen navigation still for the first part. We are using version 4 to stay tuned.

Discover and read more posts from Krissanawat Kaewsanmuang
get started