How to use the react-router-redux.push function in react-router-redux

To help you get started, we’ve selected a few react-router-redux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Soluto / tweek / services / editor / src / store / ducks / selectedKey.js View on Github external
continueGuard(shouldShowConfirmationScreen, confirmAddKeyAlert, (dispatch) => {
    // update the state to empty key in order to skip on leave hook
    dispatch({ type: KEY_OPENED, payload: createBlankJPadKey() });
    // navigate and set defaults
    dispatch(push('/keys/_blank'));
    dispatch(changeKeyValueType('string'));

    const validation = { isValid: false, hint: '', isShowingHint: false };
    setImmediate(() => dispatch(updateKeyPath(keyPath, validation)));
  });
github metasfresh / metasfresh-webui-frontend / src / containers / Login.js View on Github external
UNSAFE_componentWillMount() {
    const { logged, dispatch } = this.props;
    if (logged) {
      dispatch(push('/'));
    }
  }
github Madmous / madClones / client / src / shared / components / requiresAuth / requiresAuth.js View on Github external
checkAndRedirect() {
      const { dispatch, isAuthenticated } = this.props;

      if (!isAuthenticated) {
        dispatch(push('/login'));
      }
    }
github peerplays-network / peerplays-core-gui / dl / src / actions / NavigateActions.js View on Github external
return (dispatch) => {
      let url = redirectAfterLogin ? `/login?next=${redirectAfterLogin}` : '/login';

      if (withReplace) {
        dispatch(replace(url));
      } else {
        dispatch(push(url));
      }
    };
  }
github Rainsho / react_step_by_step / lesson110 / src / containers / DoerStatistic.jsx View on Github external
checkExist(props) {
    const { doer, dispatch } = props;
    if (!doer) dispatch(push('/home'));
  }
github shinima / battle-city / app / components / ChooseStageScene.tsx View on Github external
onStartPlay = () => {
    const { dispatch, match, location } = this.props
    const { stageName } = match.params
    dispatch(push(`/stage/${stageName}${location.search}`))
  }
github Soluto / tweek / services / editor / src / store / ducks / schema.js View on Github external
return (dispatch) => {
    dispatch({ type: ADD_NEW_IDENTITY, value: { identityType } });
    dispatch(push(`/settings/identities/${identityType}`));
  };
}
github Soluto / tweek / services / editor-new / src / store / ducks / keys.js View on Github external
async function (dispatch) {
    dispatch(push('/keys/_blank'));
    dispatch({ type: KEY_ADDING, payload: key });
  };
github hotosm / visualize-change / frontend / src / actions.js View on Github external
.then(id => {
      dispatch(push(`/edit/${id}`));
      dispatch(exportDataSaved());
    });
};

react-router-redux

Ruthlessly simple bindings to keep react-router and redux in sync

MIT
Latest version published 7 years ago

Package Health Score

58 / 100
Full package analysis