connected-react-router
connected-react-router copied to clipboard
Function as a parameter
Hi everyone 👋
Is there a possibility a function as a parameter for navigation actions (like push or replace) will ever be supported?
push(location => ({ ...location, pathname: '/courses' }));
// or
push(location => `${location.pathname}?sort=name`);
in a similar manner as <Link /> component supports it https://reacttraining.com/react-router/web/api/Link/to-function
Thanks ✌️