JSFiddle - React, Tailwind, and code Playground

HTML

<div class="review"></div>
<div class="tab"></div>

CSS

.review {
    width:100px;
    height:100px;
    background:red;
}
.tab:after {
    content:"hello";
    background:blue;
}

JavaScript

$(document).ready(function() {
    if($('.review').length) { 
      $(".tab:after").css("display", "block");
    } 
    else { 
      $(".tab:after").css("display", "none"); 
    }
});