Check out example codes for "button center bootstrap". It will help you in understanding the concepts better.

Code Example 1

<div class="text-center">
	<button type="button" class="btn btn-primary">My button</button>

Code Example 2

<div class="container my-4">

        <p class="font-weight-bold">You can align the button to the center by simply adding alignment class to the parent div. See the examples.</p>
        <p><strong>Detailed documentation and more examples you can find in our <a href=""
              target="_blank">Bootstrap Horizontal alignment Docs</a> </p>
        <p class="font-weight-bold">Basic example</p>
       <p>Add class <code>.text-center</code> to the parent div to align <strong>any item</strong> inside to the center.</p>
        <div class="border border-light p-3 mb-4">
          <div class="text-center">
            <button type="button" class="btn btn-primary">Centered button</button>

Learn ReactJs, React Native from