React Native libraries code example
Example 1: react native styles for both platforms
import { Platform, StyleSheet } from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: 'red'
},
android: {
backgroundColor: 'green'
},
default: {
// other platforms, web for example
backgroundColor: 'blue'
}
})
}
});
Example 2: react native components
/* Answer to: "react native components" */
/*
To learn about Native Components in React.js go to:
https://reactnative.dev/docs/intro-react-native-components
However, if you want to find Native Component Libraries in
React.js go to:
https://www.codeinwp.com/blog/react-native-component-libraries/