React Native の Tips。
React Navigation のソースコード見ていたら書いてあった。
const styles = StyleSheet.create({
backgroundImage: {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0,
},
})
としたい場合がしばしばあるが、これは
const styles = StyleSheet.create({
backgroundImage: {
...StyleSheet.absoluteFillObject,
},
})
と、書ける。
ドキュメントにもよく見たらあった。