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

Code Example 1

<script>
function myFunction() {
  // Declare variables

    var input, filter, 
ul, li, a, i, txtValue;
  input = document.getElementById('myInput');
  
filter = input.value.toUpperCase();
  ul = 
document.getElementById("myUL");
  li = 
ul.getElementsByTagName('li');

  // Loop through all 
list items, and hide those who don't match the search query
  for (i = 0; i < 
li.length; i++) {
    a = li[i].getElementsByTagName("a")[0];

      
  txtValue = a.textContent || a.innerText;
    
if (txtValue.toUpperCase().indexOf(filter) > -1) {
      
li[i].style.display = "";
    } 
else {
      
li[i].style.display = "none";
    
}
  }
}

</script>

Code Example 2

<!-- Load icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

  
<!-- The form -->
<form class="example" action="action_page.php">
  
  <input type="text" placeholder="Search.." name="search">
  <button 
  type="submit"><i class="fa fa-search"></i></button>
</form>

Learn ReactJs, React Native from akashmittal.com