Use resourceContext to provide environment data
masterThe resourceContext prop allows you to inject data into the lifecycle of your resources. This data is automatically made available to the getKey and getData functions of every resource associated with your routes. This is useful for passing API base URLs, environment flags, or authentication tokens that resources need to construct keys or fetch data.
import { environment } from './constants';
export const App = () => (
<Router history={history} routes={routes} resourceContext={{ environment }}>
<RouteComponent />
</Router>
);