Decoupling API calls with react components - Kinde