JSFiddle - React, Tailwind, and code Playground

HTML

1. <input type="text" id="focus_1" />
<input type="button" value="Focus 2" onclick="$('#focus_2').focus()" /> 

2. <input type="text" id="focus_2" /> 
<input type="button" value="Focus 1" onclick="$('#focus_1').focus()" />