Closed shrikantpardhi closed 1 year ago
I tried below example also.
import toast, { Toaster } from 'react-hot-toast'; const notify = () => toast('Here is your toast.'); const App = () => { const handle = () => { () => notify(); } return ( <div> <button onClick={handle}>Make me a toast</button> <Toaster /> </div> ); };
I am not getting errors.
Resolved the issue, I used the below code and it worked.
const handle = () => { toast('Here is your toast.'); }
I tried below example also.
I am not getting errors.