April 2017
Intermediate to advanced
414 pages
8h 14m
English
Now, we should create an Android-specific App component for Friends. Start by renaming the existing App.js file found at Friends/app/App.js as App.ios.js and create a new file titled App.android.js.
This file should contain similar logic to App.ios.js, but any references to iOS-specific components, such as TabBarIOS, should be removed. Additionally, any navigation events should be updated to support Navigator logic.
Here's how I did it:
// Friends/app/App.android.js ...
The following three items were removed from the import statements: NavigatorIOS, TabBarIOS, and LoginPage:
export default class App extends Component {
constructor (props) {
...
}
The selectedTab property in state was removed from ...
Read now
Unlock full access