diff --git a/CHANGELOG.md b/CHANGELOG.md index 4476cd3..7980f66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,13 @@ -## [HEAD](https://github.com/rackt/redux-simple-router/compare/2.0.4...master) +## [HEAD](https://github.com/rackt/react-router-redux/compare/2.0.4...master) -- Export action creators as individual functions. [#225](https://github.com/rackt/redux-simple-router/pull/225) +- Export action creators as individual functions. [#225](https://github.com/rackt/react-router-redux/pull/225) -## [2.0.4](https://github.com/rackt/redux-simple-router/compare/2.0.2...2.0.4) +## [2.0.4](https://github.com/rackt/react-router-redux/compare/2.0.2...2.0.4) -- Remove `history` module published within the tarball. [#133](https://github.com/rackt/redux-simple-router/issues/133) -- Make actions conform to [Flux Standard Action](https://github.com/acdlite/flux-standard-action). [#208](https://github.com/rackt/redux-simple-router/pull/208) +- Remove `history` module published within the tarball. [#133](https://github.com/rackt/react-router-redux/issues/133) +- Make actions conform to [Flux Standard Action](https://github.com/acdlite/flux-standard-action). [#208](https://github.com/rackt/react-router-redux/pull/208) -## [2.0.2](https://github.com/rackt/redux-simple-router/compare/1.0.2...2.0.2) +## [2.0.2](https://github.com/rackt/react-router-redux/compare/1.0.2...2.0.2) Versions 2.0.0 and 2.0.1 were test releases for the 2.* series. 2.0.2 is the first public release. @@ -19,18 +19,18 @@ Versions 2.0.0 and 2.0.1 were test releases for the 2.* series. 2.0.2 is the fir * `UPDATE_PATH` is now `UPDATE_LOCATION`. * The fully parsed [location object](https://github.com/rackt/history/blob/master/docs/Location.md) is now stored in the state instead of a URL string. To access the path, use `state.routing.location.pathname` instead of `state.routing.path`. -[View the new docs](https://github.com/rackt/redux-simple-router#api) +[View the new docs](https://github.com/rackt/react-router-redux#api) -## [1.0.2](https://github.com/rackt/redux-simple-router/compare/1.0.1...1.0.2) +## [1.0.2](https://github.com/rackt/react-router-redux/compare/1.0.1...1.0.2) * Only publish relevant files to npm -## [1.0.1](https://github.com/rackt/redux-simple-router/compare/1.0.0...1.0.1) +## [1.0.1](https://github.com/rackt/react-router-redux/compare/1.0.0...1.0.1) * Solve problem with `basename` causing infinite redirects (#103) * Switched to ES6 imports/exports internally, but should not affect outside users -## [1.0.0](https://github.com/rackt/redux-simple-router/compare/0.0.10...1.0.0) +## [1.0.0](https://github.com/rackt/react-router-redux/compare/0.0.10...1.0.0) > 2015-12-09 This release changes quite a bit so you'll have to update your code. diff --git a/README.md b/README.md index 8fb1407..a940d57 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# redux-simple-router +# react-router-redux -[![npm version](https://img.shields.io/npm/v/redux-simple-router.svg?style=flat-square)](https://www.npmjs.com/package/redux-simple-router) [![npm downloads](https://img.shields.io/npm/dm/redux-simple-router.svg?style=flat-square)](https://www.npmjs.com/package/redux-simple-router) [![build status](https://img.shields.io/travis/rackt/redux-simple-router/master.svg?style=flat-square)](https://travis-ci.org/rackt/redux-simple-router) +[![npm version](https://img.shields.io/npm/v/react-router-redux.svg?style=flat-square)](https://www.npmjs.com/package/react-router-redux) [![npm downloads](https://img.shields.io/npm/dm/react-router-redux.svg?style=flat-square)](https://www.npmjs.com/package/react-router-redux) [![build status](https://img.shields.io/travis/rackt/react-router-redux/master.svg?style=flat-square)](https://travis-ci.org/rackt/react-router-redux) **Let react-router do all the work** :sparkles: @@ -11,18 +11,18 @@ react-router does a great job of mapping the current URL to a component tree, an The entire state that we are interested in boils down to one thing: the URL. This is an extremely simple library that just puts the URL in redux state and keeps it in sync with any react-router changes. Additionally, you can change the URL via redux and react-router will change accordingly. ``` -npm install redux-simple-router +npm install react-router-redux ``` -If you want to install the next major version, use `redux-simple-router@next`. Run `npm dist-tag ls redux-simple-router` to see what `next` is aliased to. +If you want to install the next major version, use `react-router-redux@next`. Run `npm dist-tag ls react-router-redux` to see what `next` is aliased to. -View the [CHANGELOG](https://github.com/rackt/redux-simple-router/blob/master/CHANGELOG.md) for recent changes. +View the [CHANGELOG](https://github.com/rackt/react-router-redux/blob/master/CHANGELOG.md) for recent changes. Read the [API docs](#api) farther down this page. ##### _What about redux-router?_ -[redux-router](https://github.com/rackt/redux-router) is another project which solves the same problem. However, it's far more complex. Take a quick look at [the code for this library](https://github.com/rackt/redux-simple-router/blob/master/src/index.js)—it's extremely minimal. redux-router is much bigger and more complex. +[redux-router](https://github.com/rackt/redux-router) is another project which solves the same problem. However, it's far more complex. Take a quick look at [the code for this library](https://github.com/rackt/react-router-redux/blob/master/src/index.js)—it's extremely minimal. redux-router is much bigger and more complex. That said, redux-router is a fine project and has features this doesn't provide. Use it if you like it better. @@ -36,7 +36,7 @@ That said, redux-router is a fine project and has features this doesn't provide. The idea of this library is to use react-router's functionality exactly like its documentation tells you to. You can access all of its APIs in routing components. Additionally, you can use redux like you normally would, with a single app state. -[redux](https://github.com/rackt/redux) (`store.routing`)  ↔  [**redux-simple-router**](https://github.com/rackt/redux-simple-router)  ↔  [history](https://github.com/rackt/history) (`history.location`)  ↔  [react-router](https://github.com/rackt/react-router) +[redux](https://github.com/rackt/redux) (`store.routing`)  ↔  [**react-router-redux**](https://github.com/rackt/react-router-redux)  ↔  [history](https://github.com/rackt/history) (`history.location`)  ↔  [react-router](https://github.com/rackt/react-router) We only store current URL and state, whereas redux-router stores the entire location object from react-router. You can read it, and also change it with an action. @@ -52,7 +52,7 @@ import ReactDOM from 'react-dom' import { createStore, combineReducers, applyMiddleware } from 'redux' import { Provider } from 'react-redux' import { Router, Route, browserHistory } from 'react-router' -import { syncHistory, routeReducer } from 'redux-simple-router' +import { syncHistory, routeReducer } from 'react-router-redux' import reducers from '/reducers' const reducer = combineReducers(Object.assign({}, reducers, { @@ -84,7 +84,7 @@ ReactDOM.render( Now you can read from `state.routing.location.pathname` to get the URL. It's far more likely that you want to change the URL more often, however. You can use the `push` action creator that we provide: ```js -import { routeActions } from 'redux-simple-router' +import { routeActions } from 'react-router-redux' function MyComponent({ dispatch }) { return