Using useMutation to make an advanced toggle in React
Recently, we were adding some new functionality to our dashboard, and we wanted an experience like this:
The basic features are:
* The toggle should make an external request when clicked to change the setting
* While the request is being made, a loading spinner should appear next to the toggle
* If