You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure to check out [Troubleshooting Redux](http://gaearon.github.io/redux/docs/Troubleshooting.html) first.
398
+
399
+
### My views aren’t updating!
400
+
401
+
See the link above.
402
+
In short,
403
+
404
+
* Reducers should never mutate state, they must return new objects, or React Redux won’t see the updates.
405
+
* Make sure you either bind action creators with `mapDispatchToState` argument to `connect()` or with `bindActionCreators()` method, or that you manually call `dispatch()`. Just calling your `MyActionCreators.addTodo()` function won’t work because it just *returns* an action, but not *dispatches* it.
406
+
407
+
### My views aren’t updating on route change with React Router 0.13
408
+
409
+
If you’re using React Router 0.13, you might [bump into this problem](https://github.com/gaearon/react-redux/issues/43). The solution is simple: whenever you use `<RouteHandler>` or the `Handler` provided by `Router.run`, pass the router state to it.
410
+
411
+
Root view:
412
+
413
+
```js
414
+
Router.run(routes, Router.HistoryLocation, (Handler, routerState) => { // note "routerState" here
415
+
React.render(
416
+
<Provider store={store}>
417
+
{() =><Handler routerState={routerState} />} // note "routerState" here
Conveniently, this gives your components access to the router state!
432
+
You can also upgrade to React Router 1.0 which shouldn’t have this problem. (Let us know if it does!)
433
+
434
+
### I have some weird context error
435
+
436
+
If you have context issues, [make sure you don’t have duplicate React](https://medium.com/@dan_abramov/two-weird-tricks-that-fix-react-7cf9bbdef375) on the page.
437
+
Also make sure you didn’t forget to wrap your root component in [`<Provider>`](#provider-store).
0 commit comments