Check out example codes for "what does container class do in bootstrap". It will help you in understanding the concepts better.

Code Example 1

In Bootstrap, container is used to set the content's margins dealing
with the responsive behaviors of your layout. It contains the row elements
and the row elements are the container of columns (known as grid system).

The container class is used to create boxed content.

Code Example 2

Containers are the most basic layout element in Bootstrap and are required when using our default grid system. Choose from a responsive, fixed-width container (meaning its max-width changes at each breakpoint) or fluid-width (meaning it’s 100% wide all the time).
While containers can be nested, most layouts do not require a nested container.

<div class="container">
  <!-- Content here -->

Learn ReactJs, React Native from