Methods
-
processRequirements(requirements, dispatch, getState, accountState, renderProps, callbacks)
-
Checks each of the given requirements to see if they are met, and calls their
onFailhandler otherwise. If any of the requirements fail, it will not process further requirements.Parameters:
Name Type Description requirementsAn array of route requirements, as returned by the
parseRouteRequirementsutil.dispatchfunction The redux dispatch function
getStatefunction The redux getState function
accountStaterenderPropsThe current render props returned by react-router
callbacksAn object containing callbacks that a
RouteRequirementinstance can execute in itsonFailhandler. Should include the following callbacks:redirect(path)A function that will redirect to the given pathredirectToLogin()A function that will redirect to the login endpoint
Returns:
A promise that resolve with a boolean indicating if all requirements are met. If this is false, we should abort rendering of the current page.
- Type
- Promise