I usually just use Tanstack Query as an ergonomic wrapper for async functions to get the isLoading variable and define onSuccess, onError, etc. behavior Software Engineering 11 Thought 5 Programming 5 Async 1 Query 1 March 14, 2023