1. Development Environment
The only official Windows IDE to work with Android apps is Android Studio. There are some unofficial iOS simulators for Windows to test iOS apps, but their reliability isn’t guaranteed by Apple. For macOS users, the situation is simpler as Android Studio works on Mac. So we recommend that React Native developers choose Macs for work. Building applications for both Android and iOS with React Native is possible with Windows, but testing is limited as XCode (a very helpful tool) and its simulator is only available on macOS.
2. Shadows
Implementing shadows is one difficulty when working on cross-platform apps for iOS and Android. React Native lets you simply style your application with JavaScript. The style names and values match CSS for the web (with some exceptions for camel casing).
We would use code like this to add a shadow:
import React from 'react';
import { View, Text, Picker, Platform } from 'react-native';
const styles = {
wrapper: {
justifyContent: 'center', alignItems: 'center', flex: 1
},
title: {
fontSize: 20,
marginBottom: 40
},
shadowTest: {
width: 300,
height: 300,
backgroundColor: '#00d664',
shadowColor: 'black',
shadowOffset: { width: 5, height: 5 },
shadowOpacity: 0.5,
shadowRadius: 10
}
};
class ShadowTest extends React.Component {
render() {
return (
Shadow Test {Platform.select({ android: 'Android', ios: 'IOS' })}
);
}
}
export default ShadowTest;