How to use the connected-react-router.ConnectedRouter 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 opentripplanner / otp-react-redux / build / components / app / responsive-webapp.js View on Github external
value: function render() {
      var _this2 = this;

      var routerConfig = this.props.routerConfig;
      return _react.default.createElement(_connectedReactRouter.ConnectedRouter, {
        basename: routerConfig && routerConfig.basename,
        history: history
      }, _react.default.createElement("div", null, _react.default.createElement(_reactRouter.Switch, null, _react.default.createElement(_reactRouter.Route, {
        exact: true,
        path: [// App root
        '/' // ,
        // Load app with preset lat/lon/zoom and optional router
        // NOTE: All params will be cast to :id in matchContentToUrl due
        // to a quirk with react-router.
        // https://github.com/ReactTraining/react-router/issues/5870#issuecomment-394194338
        // '/@/:latLonZoomRouter',
        // '/start/:latLonZoomRouter',
        // // Route viewer (and route ID).
        // '/route',
        // '/route/:id',
        // // Stop viewer (and stop ID).
github wooline / react-coat / dist / index.js View on Github external
function buildApp(view, container, storeMiddlewares, storeEnhancers, store, history) {
    var WithRouter = reactRouterDom.withRouter(view);
    ReactDOM.render(React.createElement(reactRedux.Provider, { store: store },
        React.createElement(ErrorBoundary$1, null,
            React.createElement(connectedReactRouter.ConnectedRouter, { history: history },
                React.createElement(WithRouter, null)))), document.getElementById(container));
}
github wooline / react-coat / build / dist / Application.js View on Github external
.then(function () {
        var data = store.getState();
        return {
            ssrInitStoreKey: ssrInitStoreKey,
            data: data,
            html: render(React.createElement(react_redux_1.Provider, { store: store },
                React.createElement(connected_react_router_1.ConnectedRouter, { history: history },
                    React.createElement(appModule.views.Main, null)))),
        };
    });
}