-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Description
Taking v4.0.0-2 for a spin after checking out the website. But I keep running into this error:
I thought that perhaps one of my components were what was causing the issue but I went through all of them and could not find any reason in my components but still same error. So then I removed <Navbar />
component and all <Match />
components except for the first one that uses the pattern '/'
and it worked. But As soon as I add one more to the mix it fails. So I thought okay what If I add another that renders the same HomeContainer
component. Again it still failed to render.
Heres the code that fails:
import React from 'react';
import Router from 'react-router/BrowserRouter'
import Match from 'react-router/Match'
import Miss from 'react-router/Miss'
// other components...
render(
(
<Provider store={store}>
<Router>
<Navbar isAuthenticated={true}/>
<Match exactly pattern='/' component={HomeContainer}/>
<Match pattern='/:username' component={ProfileContainer} />
<Match pattern='/:username/:repo' component={RepoContainer} />
<Match pattern='studio' component={StudioContainer} />
<Miss component={NotFound} />
</Router>
</Provider>
), document.getElementById('app')
);
This code below works:
import React from 'react';
import Router from 'react-router/BrowserRouter'
import Match from 'react-router/Match'
import Miss from 'react-router/Miss'
// other components...
render(
(
<Provider store={store}>
<Router>
<Match exactly pattern='/' component={HomeContainer}/>
</Router>
</Provider>
), document.getElementById('app')
);
This code also fails:
import React from 'react';
import Router from 'react-router/BrowserRouter'
import Match from 'react-router/Match'
import Miss from 'react-router/Miss'
// other components...
render(
(
<Provider store={store}>
<Router>
<Match exactly pattern='/' component={HomeContainer}/>
<Match pattern='/lol' component={HomeContainer} />
</Router>
</Provider>
), document.getElementById('app')
);
I've tried to follow along with the website but can't seem to find a fix.
axelson
Metadata
Metadata
Assignees
Labels
No labels