Setting up the Folder Structure
Let's initialize a React Native project using React Native's CLI. The project will be named imageShare
and will be available for iOS and Android devices:
react-native init --version="0.44.0" imageShare
In order to use some packages in this app, we will be using a specific version of React Native (0.44.0
).
We will be using Redux for our app, so we will create a folder structure in which we can accommodate our reducers
, actions
, components
, screens
, and api
calls:
Moreover, we have added logo.png
in the img
folder. For the rest, we have a very standard React Native project. The entry point will be index.ios.js
for iOS and index.android.js
for Android:
/*** index.ios.js and index.android.js ***/ import { AppRegistry } from 'react-native'; import App from './src/main'; AppRegistry.registerComponent('imageShare', () => App);
We have the same implementation for both files as we want to use src/main.js
as the common...