JSFiddle - React, Tailwind, and code Playground

HTML

<select id="selectlang">
  <option value="de" selected>Deutsch</option>
  <option value="en">English</option>
</select>

JavaScript

lang = 'en';
$('option:selected').attr('selected', false);
$('option[value="' + lang + '"]').attr('selected', true)