Check out example codes for "css how to stop screen from left and right". It will help you in understanding the concepts better.

Code Example 1

<div class="off-screen"></div>

Code Example 2

/* The problem */
.off-screen {
  position: absolute;
  right: -50px;
  
  width: 100px;
  height: 100px;
  
  background-color: red;
}

/* The solution */
body {
  overflow-x: hidden;
}

Learn ReactJs, React Native from akashmittal.com