JSFiddle - React, Tailwind, and code Playground

HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input type="text" value="0">
<input type="text" value="0">

JavaScript

$('input').focus(function(){
   if($(this).val() == 0) $(this).val(''); 
}).blur(function(){
   if($(this).val() == '') $(this).val(0);
});