JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/black-tie/jquery-ui.css">
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min.js"></script>
<input type="text" />
<p>0</p>

CSS

p { float: left }

JavaScript

$(function () {
    var numRequests = 0;
    $("input").autocomplete({
        source: function (request, response) {
            $("p").text(++numRequests);
            $.when($.ajax({
                type: "POST",
                url: "/echo/json/",
                data: {
                    json: JSON.stringify(["Toyota", "Honda", "Nissan"])
                }
            })).then(response);
        },
        delay: 300
    });
});