I am trying to learn Reactjs and use it together with react-bootstrap. Right now I have a very simple template with two columns. What I need is these columns to resize according to the window-size.
I have managed to do that by adding in the CSS: window.innerHeight as:
const styles = {
container: {
},
right: {
height: window.innerHeight,
padding: 0,
margin: 0,
overflow: 'hidden',
backgroundColor: 'yellow'
},
left: {
overflowY: '100%',
padding: 0,
height: window.innerHeight,
paddingBottom: '50px',
backgroundColor: 'white'
},
row: {
marginBottom: 0
}
}
But I don't like it as I actually put javascript inside my CSS. I would prefer to avoid this. Do you have any recommendations?