By no means is this the 'right' or 'only' way to build a React or React Native App. We have however, worked on various apps built with React and React Native, that are 'in the wild' right now. So the ideas presented here are simply based on experience.
We're using Airbnb's JS/React Style Guide with ESLint linting. We just like it :)
To be clear, No it isn't. We've tried sharing absolutely everything across web and native mobile apps - and have run into road blocks where we've needed to undo the "universalism".
Our opinion for performant and maintainable solutions, is to:
- Share things like data structures, libraries and business logic
- And hand craft optimal user-interfaces for each platform
React Native Express is a great site to get you started, specifically:
Once you've got your head around the basics, checkout the React Native and React websites, specifically
- Go through 'The Basics'
- Gain an understanding of the components React Native provides out of the box
You can edit app.json
to include configuration keys under the expo
key.
To change your app's display name, set the name
key in app.json
to an appropriate string.
To set an app icon, set the icon
key in app.json
to be either a local path or a URL. It's recommended that you use a 512x512 png file with transparency.
If you want to build and deploy your app yourself, you'll need to eject from CRNA and use Xcode and Android Studio.
This is usually as simple as running npm run eject
in your project, which will walk you through the process. Make sure to install react-native-cli
and follow the native code getting started guide for React Native.