1st:
Though this way is good cuz that using type props of view.
import { ViewStyle } from 'react-native'
const preview: ViewStyle = {
flex: 1,
justifyContent: 'flex-end',
alignItems: 'center',
}
export default {
preview
}
2nd: common one
import { StyleSheet } from "react-native";
const styles: any = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'flex-end',
alignItems: 'center',
},
}
export default styles
3rd:
Using function to import theme for style
const styles = ({applicationStyle, font, metric, color}) => ({
container: {
flex: 1,
justifyContent: 'flex-end',
alignItems: 'center',
color: color.ba
},
})
export default styles
So could you guys tell me the props and cons of each way?