Open fellypsantos opened 9 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
react-hot-toast | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 11, 2024 5:58am |
The objective of this simple code increment is to allow execute some code ONLY after
promise.toast
completes its execution.In my scenario it's useful to control UI elements that I want to keep disabled while the promise is running, disabling a button to be more specific, and reenabling the button with the "finally" callback, no matter if the promise resolves or rejects.
Example code: