Skip to content

Commit 58e7b98

Browse files
committed
[changed] activeRoute -> activeRouteHandler
its not really the route component, but rather the active route’s handler
1 parent f187c30 commit 58e7b98

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ var App = React.createClass({
8686
<li><Link to="users">Users</Link></li>
8787
<li><Link to="user" userId="123">User 123</Link></li>
8888
</ul>
89-
<this.props.activeRoute/>
89+
<this.props.activeRouteHandler/>
9090
</div>
9191
);
9292
}
@@ -103,7 +103,7 @@ var Users = React.createClass({
103103
return (
104104
<div>
105105
<h2>Users</h2>
106-
<this.props.activeRoute/>
106+
<this.props.activeRouteHandler/>
107107
</div>
108108
);
109109
}
@@ -116,16 +116,16 @@ var User = React.createClass({
116116
});
117117
```
118118

119-
To better understand what is happening with `activeRoute` perhaps an
119+
To better understand what is happening with `activeRouteHandler` perhaps an
120120
example without the router will help. Lets take the scenario where
121121
`/users/2` has been matched. Your render method, without this router,
122122
might look something like this:
123123

124124
```js
125125
render: function() {
126126
var user = <User params={{userId: 2}}/>;
127-
var users = <User activeRoute={user}/>;
128-
return <App activeRoute={users}/>;
127+
var users = <User activeRouteHandler={user}/>;
128+
return <App activeRouteHandler={users}/>;
129129
}
130130
```
131131

@@ -190,7 +190,7 @@ routes do not inherit the path of their parent.
190190

191191
Routes can be nested. When a child route matches, the parent route's
192192
handler will have an instance of the child route's handler available as
193-
`this.props.activeRoute()`. You can then render it in the parent
193+
`this.props.activeRouteHandler()`. You can then render it in the parent
194194
passing in any additional props as needed.
195195

196196
#### Examples
@@ -225,7 +225,7 @@ props and static methods available to these components.
225225

226226
#### Props
227227

228-
**this.props.activeRoute(extraProps)** - The active child route handler.
228+
**this.props.activeRouteHandler(extraProps)** - The active child route handler.
229229
Use it in your render method to render the child route, passing in
230230
additional properties as needed.
231231

examples/auth-flow/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var App = React.createClass({
3434
<li><Link to="about">About</Link></li>
3535
<li><Link to="dashboard">Dashboard</Link> (authenticated)</li>
3636
</ul>
37-
{this.props.activeRoute()}
37+
{this.props.activeRouteHandler()()}
3838
</div>
3939
);
4040
}

examples/data-flow/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var App = React.createClass({
4141
{links}
4242
</ul>
4343
<div className="Detail">
44-
{this.props.activeRoute({onRemoveTaco: this.handleRemoveTaco})}
44+
{this.props.activeRouteHandler({onRemoveTaco: this.handleRemoveTaco})}
4545
</div>
4646
</div>
4747
);

examples/dynamic-segments/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var App = React.createClass({
1212
<li><Link to="user" userId="123">Bob</Link></li>
1313
<li><Link to="user" userId="abc">Sally</Link></li>
1414
</ul>
15-
{this.props.activeRoute()}
15+
{this.props.activeRouteHandler()}
1616
</div>
1717
);
1818
}
@@ -27,7 +27,7 @@ var User = React.createClass({
2727
<li><Link to="task" userId={this.props.params.userId} taskId="foo">foo task</Link></li>
2828
<li><Link to="task" userId={this.props.params.userId} taskId="bar">bar task</Link></li>
2929
</ul>
30-
{this.props.activeRoute()}
30+
{this.props.activeRouteHandler()}
3131
</div>
3232
);
3333
}

examples/master-detail/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ var App = React.createClass({
120120
</ul>
121121
</div>
122122
<div className="Content">
123-
{this.props.activeRoute() || this.indexTemplate()}
123+
{this.props.activeRouteHandler() || this.indexTemplate()}
124124
</div>
125125
</div>
126126
);

examples/partial-app-loading/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var App = React.createClass({
5252
<ul>
5353
<li><Link to="dashboard">Dashboard</Link></li>
5454
</ul>
55-
{this.props.activeRoute()}
55+
{this.props.activeRouteHandler()}
5656
</div>
5757
);
5858
}

examples/partial-app-loading/dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var Dashboard = React.createClass({
1313
<ul>
1414
<li><Link to="inbox">Inbox</Link></li>
1515
</ul>
16-
{this.props.activeRoute()}
16+
{this.props.activeRouteHandler()}
1717
</div>
1818
);
1919
}

examples/query-params/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var App = React.createClass({
1313
<li><Link to="user" userId="123" query={{showAge: true}}>Bob With Query Params</Link></li>
1414
<li><Link to="user" userId="abc">Sally</Link></li>
1515
</ul>
16-
{this.props.activeRoute()}
16+
{this.props.activeRouteHandler()}
1717
</div>
1818
);
1919
}

examples/shared-root/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var App = React.createClass({
1313
<li><Link to="signin">Sign in</Link></li>
1414
<li><Link to="forgot-password">Forgot Password</Link></li>
1515
</ol>
16-
{this.props.activeRoute()}
16+
{this.props.activeRouteHandler()}
1717
</div>
1818
);
1919
}
@@ -24,7 +24,7 @@ var SignedIn = React.createClass({
2424
return (
2525
<div>
2626
<h2>Signed In</h2>
27-
{this.props.activeRoute()}
27+
{this.props.activeRouteHandler()}
2828
</div>
2929
);
3030
}
@@ -43,7 +43,7 @@ var SignedOut = React.createClass({
4343
return (
4444
<div>
4545
<h2>Signed Out</h2>
46-
{this.props.activeRoute()}
46+
{this.props.activeRouteHandler()}
4747
</div>
4848
);
4949
}

examples/simple-master-detail/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var App = React.createClass({
2323
{links}
2424
</ul>
2525
<div className="Detail">
26-
{this.props.activeRoute() || this.indexTemplate()}
26+
{this.props.activeRouteHandler() || this.indexTemplate()}
2727
</div>
2828
</div>
2929
);

0 commit comments

Comments
 (0)