I'm using Material UI grid and as soon as I put spacing higher than 0 ,my Grid doesnt fit the screen and bottom slider is visible and i can move the page horizontally a bit.
Simplified code i'm using :
<Grid container
justify="space-around"
spacing={4}>
<Grid item xs={6} >
<Paper>a</Paper>
</Grid>
<Grid item xs={6} >
<Paper>b</Paper>
</Grid>
</Grid>
With spacing = 0 , the grid fits completely and bottom slider is not there. How do I still keep spaces between grid items making sure the grid doesnt increase the width of the app . What am I doing wrong?
Link to codesandbox with same issue replicated : https://codesandbox.io/s/magical-sammet-y0297?fontsize=14&hidenavigation=1&theme=dark
Thanks