Skip to content

Commit

Permalink
Merge pull request #17 from namikingsoft/support/browser-history
Browse files Browse the repository at this point in the history
BrowserHistoryに対応する
  • Loading branch information
namikingsoft committed Jun 1, 2016
2 parents 2db6f9b + 6ca4dd1 commit bb32f6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -4,7 +4,7 @@ import React from "react"
import ReactDOM from "react-dom"
import { Provider } from "react-redux"
import { createStore, applyMiddleware } from "redux"
import { Router, Route, IndexRoute, hashHistory } from "react-router"
import { Router, Route, IndexRoute, browserHistory } from "react-router"
import createSagaMiddleware from "redux-saga"
import reducer from "reducers"
import saga from "sagas"
Expand All @@ -19,7 +19,7 @@ sagaMiddleware.run(saga)

ReactDOM.render(
<Provider store={store}>
<Router history={hashHistory}>
<Router history={browserHistory}>
<Route path="/" component={LayoutContainer}>
<IndexRoute component={TopPage} />
<Route path="Hello/:name" component={HelloPage} />
Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Expand Up @@ -11,7 +11,7 @@ var compiler = webpack(config)
app.use(webpackDevMiddleware(compiler, { noInfo: true, publicPath: config.output.publicPath }))
app.use(webpackHotMiddleware(compiler))

app.get("/", function(req, res) {
app.get("*", function(req, res) {
res.sendFile(__dirname + '/index.html')
})

Expand Down

0 comments on commit bb32f6e

Please sign in to comment.