react-query: useMutation, useQuery and isLoading, how to prevent showing old data – Reactjs
I'm using react-query in my React app to fetch and mutate data. When I click a button to mutate the data, I need the button to be disabled and spinner to appear until the new mutated data is returned. To…