File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,35 @@ handler will have the child route's handler available as
30
30
` this.props.activeRouteHandler ` . You can then render it in the parent
31
31
passing in any additional props as needed.
32
32
33
+ ### [ prop]
34
+
35
+ Any additional, user-defined, properties will be become properties of
36
+ the rendered handler.
37
+
38
+ #### Example:
39
+
40
+ ``` js
41
+ var App;
42
+ var foo = " hello" ;
43
+
44
+ var routes = (
45
+ < Routes>
46
+ // pass `foo` to `something`
47
+ < Route handler= {App} something= {foo}/ >
48
+ < / Routes>
49
+ );
50
+
51
+ App = React .createClass ({
52
+ render : function () {
53
+ // access `something` on props
54
+ return < div> {this .props .something }< / div>
55
+ }
56
+ });
57
+
58
+ React .renderComponent (routes, document .body );
59
+ document .body .innerHTML // -> <div>hello</div>
60
+ ```
61
+
33
62
Example
34
63
-------
35
64
You can’t perform that action at this time.
0 commit comments