withRouterAction
Higher-Order Components for dispatching an action with the data from the router context, when the route is matched and corresponding component is about to mount.
The action will receive the location and the match from react-router.
withRouterAction(action)
is useful, when you want to run side-effects in the Epics right after Component being loaded.
Arguments
action
(string
): Redux Action to dispatch.
Returns
(Function
): A Higher-Order Components function that enables us to dispatch an Action, when Component is mounted.
Example: Dispatching an Action, when the Container is mounted.
./src/containers/About
./src/containers/About
Last updated