I'm having trouble positioning a component
of tabbar
I'm doing.
Home.js
import React, {Component} from 'react'
import {View, Text, ScrollView} from 'react-native'
import Header from './../components/Header'
import Card from './../components/Card'
import TabBar from './../components/TabBar'
class Home extends Component{
render(){
const {scrollContent, tab, scroll} = styles
return(
<View>
<Header />
<View>
<ScrollView>
<Card />
</ScrollView>
</View>
<TabBar />
</View>
)
}
}
export default Home
TabBar.js
import React from 'react'
import {View, Text} from 'react-native'
const TabBar = () => {
const {tab} = styles
return(
<View style={tab}>
</View>
)
}
const styles = {
tab: {
height: 50,
backgroundColor: '#000',
position: 'absolute',
bottom: 0,
flexDirection: 'row'
}
}
export default TabBar
If I leave with position: 'absolute'
, it disappears from the screen, if I take it, it gets below my card
component.
The idea is that it stays at the end of the screen, fixed.