want to set loading spinner on popup
I tried to set spinner but its not working .
I'm using functional component approach , all api calls are in popup page so I'm not able to put spinner while all api's gets data in return.
want to set loading spinner on popup
I tried to set spinner but its not working .
I'm using functional component approach , all api calls are in popup page so I'm not able to put spinner while all api's gets data in return.
Copyright © 2021 Jogjafile Inc.
You can use
useStateto create a loading state. Then, when the popup is opened, you should set the loading state to true, and then you should listen for the close event of the popup (see Capture the close event of popup window in JavaScript). When the popup is closed, you can then set the loading state to false.