JSFiddle - React, Tailwind, and code Playground

HTML

<form name="ff">
     <select id="type" name="type">
    	<option value="0">Federal</option>
    	<option selected="selected" value="1">Estadual</option>
    	<option value="2">Municipal</option>
    </select><br>
    <div id="state" >
     <label>Estado</label>
  <input type="text" name="state"/> <br>
    </div>
 <div id="city">
   <label>Cidade</label>
    <input type="text" name="city"   /><br>
 </div>
 
     <label>Nome</label>
    <input type="text" name="name" id="name" />
</form>

JavaScript

$(document).ready(function() {
  $('#state').hide();
  $('#city').hide();
  $('#type').change(function() {
    if ($('#type').val() == 1) {
        $('#state').show();
        $('#city').hide();
    }if($('#type').val() == 2) {
        $('#state').show();
        $('#city').show();
    }if($('#type').val() == 0) {
      $('#state').hide();
      $('#city').hide();
    }
  });
});