Skip to content

Commit c526b78

Browse files
committed
README update
1 parent 7355a18 commit c526b78

File tree

1 file changed

+15
-28
lines changed

1 file changed

+15
-28
lines changed

README.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Docs
1111
- [Guide: Overview](/docs/guides/overview.md)
1212
- [API](/docs/api/)
1313

14-
[Try it out on JSBin](http://jsbin.com/sixose/1/edit)
15-
1614
Important Notes
1715
---------------
1816

@@ -25,17 +23,6 @@ Before our `1.0` release, breaking API changes will cause a bump to
2523
Please refer to the [upgrade guide](/UPGRADE_GUIDE.md) and
2624
[changelog](/CHANGELOG.md) when upgrading.
2725

28-
### App Dependencies
29-
30-
We use the following dependencies from npm:
31-
32-
- `when` for promises
33-
- `events` for event emitters.
34-
35-
It is likely that your app will need dependencies like these. We
36-
recommend you use the same modules that the router uses to decrease the
37-
overall size of your application.
38-
3926
Installation
4027
------------
4128

@@ -75,24 +62,24 @@ What's it look like?
7562
--------------------
7663

7764
```js
78-
React.renderComponent((
79-
<Routes location="history">
80-
<Route path="/" handler={App}>
81-
<DefaultRoute handler={Home} />
82-
<Route name="about" handler={About} />
83-
<Route name="users" handler={Users}>
84-
<Route name="recent-users" path="recent" handler={RecentUsers} />
85-
<Route name="user" path="/user/:userId" handler={User} />
86-
<NotFoundRoute handler={UserRouteNotFound}/>
87-
</Route>
65+
var routes = (
66+
<Route handler={App} path="/">
67+
<DefaultRoute handler={Home} />
68+
<Route name="about" handler={About} />
69+
<Route name="users" handler={Users}>
70+
<Route name="recent-users" path="recent" handler={RecentUsers} />
71+
<Route name="user" path="/user/:userId" handler={User} />
72+
<NotFoundRoute handler={UserRouteNotFound}/>
8873
</Route>
8974
<NotFoundRoute handler={NotFound}/>
90-
<Redirect path="company" to="about" />
91-
</Routes>
92-
), document.body);
93-
```
75+
<Redirect from="company" to="about" />
76+
</Route>
77+
);
9478

95-
All of the `handler`s will render inside their parent route `handler`.
79+
Router.run(routes, function(Handler) {
80+
React.render(<Handler/>, document.body);
81+
});
82+
```
9683

9784
See more in the [overview guide](/docs/guides/overview.md).
9885

0 commit comments

Comments
 (0)