em-use-controller is a utility for React and other SPAs that simplifies API calls by turning REST API routes into declarative, type-safe controller functions.
With em-use-controller, developers can define routes once in a config file, set global defaults for headers, baseURL, and error handling, and call any endpoint with one-liners using useController.
Features include working with all HTTP methods, handling path and query parameters, supporting Bearer and custom auth, built-in global error handling, swappable axios instance, and uploading files with FormData.
Ideal for frontend developers using RESTful APIs, especially in .NET, Java, Spring, or Node environments, those who dislike boilerplate code, and teams striving for cleaner and safer API usage.