JSFiddle - React, Tailwind, and code Playground
HTML
<section class="events">
<article data-sid="20190207">2</article>
<article data-sid="20190130">1</article>
<article data-sid="20190228">3</article>
</section>
<br>
CSS
span {
background-color: red;
display: block;
width: 100px;
height: 100px
}
JavaScript
$('.events article').sort(function(a,b) {
return $(a).data('sid') > $(b).data('sid');
}).appendTo('.events')