Skip to Main Content
React Projects
book

React Projects

by Roy Derks
December 2019
Intermediate to advanced content levelIntermediate to advanced
474 pages
10h 3m
English
Packt Publishing
Content preview from React Projects

Differences in styling for iOS and Android

When styling your application, you might want to have different styling rules for iOS and Android, for example, to match the styling of the Android operating system better. There are multiple ways to apply different styling rules to different platforms; one of them is by using the Platform module, which can be imported from React Native.

Let's try this by adding icons to the tabs in the navigator tab and have different icons for iOS and Android:

  1. First, import the icons from Expo into the App.js file. There are a lot of icon sets available from Expo. For this application, you'll import the Ionicons icon set:
import React from 'react';+ import { Ionicons } from '@expo/vector-icons';import { createAppContainer ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

React Projects - Second Edition

React Projects - Second Edition

Roy Derks
Test-Driven React

Test-Driven React

Trevor Burnham

Publisher Resources

ISBN: 9781789954937Supplemental Content