JSFiddle - React, Tailwind, and code Playground
HTML
<img src="" height="200" width="200">
JavaScript
var $image, $imageNowWidth;
$("img").hover(function(){ //mouseenter
$image = $(this);
$imageNowWidth = $image.width();
},function() { //mouseleave
//$image and $imageNowWidth is accessible HERE
});