JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="one" />
<input type="text" id="two" />

<button type="button" id="onebtn" >hide</button>

JavaScript

$('#onebtn').on('click',function(){
   							     $('#one').fadeOut('slow',function(){
       						     $('#two').fadeIn('slow');
    								});
								});