onfocus is called on reload page reactjs code example Example: how to refresh the page using react window.location.reload(false);