We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d47d7dd commit dee374fCopy full SHA for dee374f
modules/mixins/LocationContext.js
@@ -47,17 +47,13 @@ var LocationContext = {
47
48
if (location) {
49
PathStore.setup(location);
50
+ PathStore.addChangeListener(this.handlePathChange);
51
52
if (this.updateLocation)
53
this.updateLocation(PathStore.getCurrentPath(), PathStore.getCurrentActionType());
54
}
55
},
56
- componentDidMount: function () {
57
- if (this.getLocation())
58
- PathStore.addChangeListener(this.handlePathChange);
59
- },
60
-
61
componentWillUnmount: function () {
62
if (this.getLocation())
63
PathStore.removeChangeListener(this.handlePathChange);
0 commit comments