JSFiddle - React, Tailwind, and code Playground
HTML
<div class="like" data-postid="903282304865jh"><i>Element inside of div.</i> DIV</div>
JavaScript
$(".like").click(function(event){
var postID = $(this).data('postid');
alert(postID);
});