title: react toastify clear or false when button click
body: <p>I am using react-toastify for my form. currently i show the message when error or success message.
  when user's click again i need to clear or hide all type of toast notifications. please check below code.</p>
  <p>Used library for toast
  <a href="https://www.npmjs.com/package/react-toastify" rel="nofollow noreferrer">https://www.npmjs.com/package/react-toastify</a></p>
  <pre><code>      const addRecord= (form) =&gt; {
       toast.hide(); // i need to hide all toast notification 
      const header = {
        Auth_token: `${appUserConfig.accessTokenName}=${appUserConfig.accessToken}`,
        User_name: appUserConfig.userName,
      };
      httpPost(SAVE_INVOICE, data, header)
        .then((response) =&gt; {
  
          if (response.status === 200) {
            toast.success('Successfully Saved', { position: toast.POSITION.TOP_RIGHT })
          }
  
        })
        .catch((e) =&gt; {
          console.log(&quot;e:&quot;, e);
          toast.error('Something went wrong', { position: toast.POSITION.TOP_RIGHT, autoClose: false })
  
        });
  
    }
  </code></pre>
  <p>according to my requirement, I need to keep error message toast without autoClose. There fore when user click again add button i need to clear all toast notification. How i do this</p>