Reputation: 1638
NativeBase says to wrap all components inside <Container></Container>
tag.
<View></View>
tags?<Container>
tags to replace all <View>
tags and vice versa?<Container>
per screen and use <View>
for the rest of the containers inside that screen?Upvotes: 1
Views: 1551
Reputation: 2178
The 3rd point in your question is the correct one. Container
component should be used only one time per screen to wrap all your children components, it's a bit like React.Fragment
.
Container
takes generally three children components
<Container>
<Header> //<-always on top
...
</Header>
<Content> //<-supports scrolling
...
</Content>
<Footer> //<-always in the bottom
...
</Footer>
</Container>
Are there any differences in functionality or layout when using all tags to replace all tags and vice versa?
It's not recommended to replace all View
with Container
because Container
has its default styles and it will not behave the same as if you use View
component to wrap components.
Upvotes: 2