JSFiddle - React, Tailwind, and code Playground

HTML

<span id="view">Changing text does not update the ::after tag position</span>

CSS

#view {
    position: relative;
}
#view::after {
    border: solid 5px transparent;
    border-top-color: rgb(120, 120, 120);
    content:'';
    position: absolute;
    top: 0;
    right: -15px;
}

JavaScript

$(function() {
    setTimeout( function() {
        $('#view').text("Changing text does not update");
    }, 500
    );
});