views_pre_render add class item to a row
Because you do not want to alter some data, you should use a preprocess function for this. Check this out:

function MYMODULE_preprocess_views_view_unformatted(&amp;$variables) {
  $view = $variables["view"];
  $viewId = $view-&gt;id();
  if($viewId == 'my_view_id'){
    $rows = $variables['rows'];
    foreach ($rows as $id =&gt; $row) {
      $important = $row['content']['#row']-&gt;_entity-&gt;get('field_result_value')-&gt;getString();
      $custom_row_class = 'views-row-' . $important;
      $variables['rows'][$id]['attributes']-&gt;addClass($custom_row_class);
    }
  }
}