JSFiddle - React, Tailwind, and code Playground
HTML
<select id="choices">
<option>IT</option>
<option>Management</option>
</select>
<select id="dependent-select">
</select>
JavaScript
var options = {
"IT": ['Programmer', 'Technician'],
"Management": ['Sales', 'Marketing']
};
$('#choices').on('change', function () {
$('#dependent-select').empty();
options[this.value].forEach(function (value, index) {
$('#dependent-select').append($("<option />").val(value).text(value));
});
});