Dependency injection and service layer for react.js