Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will it workwith react-router 4.3.1? #10

Open
YoomiAB opened this issue Jun 12, 2019 · 0 comments
Open

Will it workwith react-router 4.3.1? #10

YoomiAB opened this issue Jun 12, 2019 · 0 comments

Comments

@YoomiAB
Copy link

YoomiAB commented Jun 12, 2019

After upgrading to react-dom 16.8 and react-router-dom 4.3.1 all routes are not rendered.
Downgrading to 4.1.2 solves the problem.

None of the routes outside the are rendered when upgrading to react-dom 4.3.x
Ie - the Sidebar and Header components are never rendered.

const AppRouter = ({isAuthenticated, ...rest}) => (
  //uses Router instead of BrowserRouter to use our own history and not the built in one
  <Router history={history}>
    <div className="appContainer">
      {SidebarLocation.toRoute({ render : (props) => privatePath({isAuthenticated, history, component:Sidebar, ...props}), invalid: NotFoundPage }, true)}
      <div className="app-MainContent content-container-parent ">
        {HeaderLocation.toRoute({ render : (props) => privatePath({isAuthenticated, history, component:Header, ...props}), invalid: NotFoundPage }, true)}

        <Switch>
          {/* Exact match and Strict match!!! */}
          {LoginLocation.toRoute({ render : (props) => publicPath({isAuthenticated, history, component:LoginPage, ...props}), invalid: NotFoundPage }, true, true)}

          {StartLocation.toRoute({ render : (props) => privatePath({isAuthenticated, history, component:DashboardPage, ...props}), invalid: NotFoundPage }, true)}
          {SearchLocation.toRoute({ render : (props) => privatePath({isAuthenticated, history, component:DashboardPage, ...props}), invalid: NotFoundPage }, true)}
          {SettingsLocation.toRoute({ render : (props) => privatePath({isAuthenticated, history, component:UserSettings, ...props}), invalid: NotFoundPage }, true)}

          <Route component={NotFoundPage} />
        </Switch>
      </div>
    </div>
  </Router>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant