JSFiddle - React, Tailwind, and code Playground

HTML

<input type = "text" class = "input-box" onchange = "hello()">

JavaScript

var fruits = ['Apples', 'Oranges'];


 	 $(function() {
    	$( ".input-box" ).autocomplete({
      		source: fruits
    	});
  	  });

function hello() {
     alert("Hi there!");   
}