Relative Content

Tag Archive for reactjsreact-querytanstackreact-query

How to prevent useMutation isPending from removing component and replacing it with the spinner component

In react query it gives you the isPending feature which allows you to create some type of spinner when an operation occurs. However, when you use the isPending feature, the component that triggers the mutation gets replaced by the returned spinner that is inside isPending block but I don’t want the spinner to replace the component instead I want the spinner to be placed on top of the component. I am not sure how to do this?