Skip to content

Commit

Permalink
Merge pull request reactjs#78 from tbloncar/tb-readme-update
Browse files Browse the repository at this point in the history
Update imports and use ReactDOM.render in README example
  • Loading branch information
jlongster committed Dec 7, 2015
2 parents 8a8654f + 63e9863 commit 3545a3e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,24 @@ it, and also change it with an action.
Here's some code:

```js
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, combineReducers } from 'redux'
import { Provider } from 'react-redux'
import { Router, Route } from 'react-router'
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { createHistory } from 'history'
import { syncReduxAndRouter, routeReducer } from 'redux-simple-router'
import reducers from '<project-path>/reducers'

const reducer = combineReducers(Object.assign({}, reducers, {
routing: routeReducer
}))
const store = createStore(reducer)
const history = createBrowserHistory()
const history = createHistory()

syncReduxAndRouter(history, store)

React.render(
ReactDOM.render(
<Provider store={store}>
<Router history={history}>
<Route path="/" component={App}>
Expand Down

0 comments on commit 3545a3e

Please sign in to comment.