This video explains how to add a spinner for buttons when a user is performing an action using HOOKS API. This will help you prevent users from clicking the button twice before performing the actual action.
Source + Demo: https://react-component-depot.netlify...
Video Timeline:
0:32 Method 1 - Adding spinner based on local state
04:57 Method 2 - Creating "useButtonLoader" hook
For other useful hooks
• Practical React Hooks
Please subscribe to the channel for more videos - / dcoders