I can give the height element of style numeric values such as 40
but these are required to be integers. How can I make my component to have a height of 100%
most of the time should be usingflexGrow: 1
or flex: 1
or you can use
import {Dimensions} from 'react-native'
const { Height } = Dimensions.get('window')
styleSheet({
classA: {
height: Height - 40
}
})
if none of them work for you try it:
container: {
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0
}