Skip to content

Commit

Permalink
Don't use pure containers
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Nov 1, 2016
1 parent af020b3 commit 4321134
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/createConnectedRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export default function createConnectedRouter({
replace: FarceActions.replace,
go: FarceActions.go,
},
null,
{
// <BaseRouter> already memoizes its render output, so there's no benefit
// to doing further memoization here.
pure: false,
},
)(createBaseRouter(options));

// This implementation is very messy, but it provides the cleanest API to get
Expand Down
4 changes: 4 additions & 0 deletions src/createWithRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default function createWithRouter({
...stateProps,
// We don't want dispatch here.
}),
{
// We can't assume the wrapped component is pure.
pure: false,
},
);

return function withRouter(Component) {
Expand Down

0 comments on commit 4321134

Please sign in to comment.