Sometimes, we want to add a fixed footer with React Native.
In this article, we’ll look at how to add a fixed footer with React Native.
How to add a fixed footer with React Native?
To add a fixed footer with React Native, we can use the ScrollView.
For instance, we write
<View style={{ flex: 1 }}>
<ScrollView>main</ScrollView>
<View>
<Text>footer</Text>
</View>
</View>
to add a ScrollView that lets us scroll through overflow content.
And we add the footer with
<View>
<Text>footer</Text>
</View>
We set flex to 1 in the style prop of the outer View to make the flex direction vertical so the items inside will be arranged vertically.
Conclusion
To add a fixed footer with React Native, we can use the ScrollView.