JSFiddle - React, Tailwind, and code Playground
HTML
<div id="info"></div>
JavaScript
var $info = $("#info");
$.ajax({
url: "/echo/json/",
data: {
json: JSON.stringify({
"name": "someValue"
})
},
type: "POST"
})
.then(function (response) {
$info.text(response.name);
})
.then(function () {
$info.append("...More");
})
.done(function () {
$info.append("...finally!");
});