Skip to content

Commit 903d5f6

Browse files
authored
Merge pull request #31 from CodingZeal/updating-react-router
Update to React Router beta
2 parents aaa2ac0 + f6da6d9 commit 903d5f6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

app/templates/client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'babel-polyfill'
22
import React from 'react'
33
import ReactDOM from 'react-dom'
44
import { ApolloProvider } from 'react-apollo'
5-
import { BrowserRouter } from 'react-router'
5+
import { BrowserRouter } from 'react-router-dom'
66
import { ThemeProvider } from 'react-css-themr'
77

88
import './styles/commons.scss'

app/templates/client/modules/app/components/App/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { Match, Miss } from 'react-router'
2+
import { Switch, Route } from 'react-router-dom'
33
import { themr } from 'react-css-themr'
44

55
import appTheme from './theme.scss'
@@ -13,8 +13,10 @@ export function App({ theme }) {
1313
<h4>Welcome!</h4>
1414
</div>
1515

16-
<Match exactly pattern='/' component={Home} />
17-
<Miss component={NotFound} />
16+
<Switch>
17+
<Route exact pattern='/' component={Home} />
18+
<Route component={NotFound} />
19+
</Switch>
1820
</div>
1921
)
2022
}

app/templates/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"react-css-themr": "^1.6.1",
2727
"react-dom": "^15.4.1",
2828
"react-redux": "^5.0.2",
29-
"react-router": "^4.0.0-alpha.6",
29+
"react-router-dom": "^4.0.0-beta.6",
3030
"react-toolbox": "^1.3.1",
3131
"redux": "^3.6.0",
3232
"redux-devtools-extension": "^1.0.0",

0 commit comments

Comments
 (0)