Check out example codes for "bootstrap 4 search bar". It will help you in understanding the concepts better.

Code Example 1

<form class="form-inline">
  <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
  <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>

Learn ReactJs, React Native from akashmittal.com