Skip to content

Commit 0aa30c1

Browse files
committed
Fix example
Fixes #523
1 parent d5da1df commit 0aa30c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

UPGRADE_GUIDE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,19 +186,20 @@ yourself:
186186
var App = React.createClass({
187187
mixins: [ Router.State ],
188188

189-
handlerKey: function () {
189+
getHandlerKey: function () {
190190
// this will all depend on your needs, but here's a typical
191191
// scenario that's pretty much what the old prop did
192192
var childDepth = 1; // have to know your depth
193193
var childName = this.getRoutes()[childDepth].name;
194194
var id = this.getParams().id;
195195
var key = childName+id;
196+
return key;
196197
},
197198

198199
render: function () {
199200
return (
200201
<div>
201-
<RouteHandler key={this.handlerKey()} />
202+
<RouteHandler key={this.getHandlerKey()} />
202203
</div>
203204
);
204205
}

0 commit comments

Comments
 (0)