Angular 6 and React 16 - API Best Approach
While exploring the difference between Angular 6 and React 16 in building SPA site and handling API request/response, I want to find out the best, appropriate means to perform API operations. Here are some thoughts I have on the two and what's best:
React 16 - Axion
Why: Don't need additional json() parsing over fetch()
Approach: Use Redux and define action.type for each operations (GET, POST), an action define post, get, etc actions as methods
Angular 6 - HttpClient
Why: Observable, interface support, piping support
Approach: Create service(s) specifically handle API requests/responses, create interface file(s) for specific response model. Use @Inject for individual API service specific to the component