How to use the connected-react-router.routerActions.push function in connected-react-router

To help you get started, we’ve selected a few connected-react-router 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 wooline / react-coat-helloworld / src / modules / photos / views / List / index.tsx View on Github external
private onItemClick = (id: string) => {
    // 记住当前滚动位置
    scrollTop = window.pageYOffset;
    const url = `/photos/${id}`;
    this.props.dispatch(routerActions.push(url));
  };
github wooline / react-coat-ssr-demo / src / modules / messages / views / List / index.tsx View on Github external
private onSearchClose = () => {
    const {dispatch, pathname} = this.props;
    dispatch(routerActions.push(toUrl(pathname, {app: {showSearch: false}, messages: {search: {title: ""}}})));
  };
github wooline / react-coat-helloworld / src / modules / app / views / BottomNav / index.tsx View on Github external
onPress={() => {
              if (!this.props.hasLogin) {
                this.props.dispatch(errorAction(new UnauthorizedError()));
              } else {
                dispatch(routerActions.push("/messages#refresh=true"));
              }
            }}
          />
github wooline / react-coat-spa-demo / src / modules / app / views / TopNav / index.tsx View on Github external
private onShowSearch = () => {
    const {pathname, showSearch, searchData, dispatch} = this.props;
    const url = toUrl(pathname, {...searchData, app: {...searchData.app, showSearch: !showSearch}});
    dispatch(routerActions.push(url));
  };
github wooline / react-coat-ssr-demo / src / modules / photos / views / List / index.tsx View on Github external
private onSearchClose = () => {
    const {dispatch, pathname} = this.props;
    dispatch(routerActions.push(toUrl(pathname, {app: {showSearch: false}, photos: {search: {title: ""}}})));
  };
github wooline / react-coat-helloworld / src / modules / photos / views / List / index.tsx View on Github external
private onPageChange = (page: number) => {
    const listSearch = {...this.props.listSearch, page};
    const search = stringifyQuery("search", listSearch, defaultListSearch);
    this.props.dispatch(routerActions.push(toUrl("/photos", search)));
  };
  private onSearch = (title: string) => {
github wooline / react-coat-helloworld / src / modules / photos / views / Details / index.tsx View on Github external
private onClose = () => {
    const listSearch = {...this.props.listSearch};
    const search = stringifyQuery("search", listSearch, defaultListSearch);
    this.props.dispatch(routerActions.push(toUrl("/photos", search)));
  };
github wooline / react-coat-helloworld / src / modules / videos / views / Details / index.tsx View on Github external
private onClose = () => {
    const listSearch = {...this.props.listSearch};
    const search = stringifyQuery("search", listSearch, defaultListSearch);
    this.props.dispatch(routerActions.push(toUrl("/videos", search)));
  };