aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/vendor/react-router/docs/api/Router.md
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-09-10 14:22:26 +1200
committerAldo Cortesi <aldo@nullcube.com>2014-09-10 14:23:10 +1200
commit0510c9b111aed03d0d3680db63614d50f231745c (patch)
tree0d2fec5d46a3cb984a8b12e36db2f44a1a8eaa5a /web/src/vendor/react-router/docs/api/Router.md
parent76982937a68a2adaf96ec2d258e369d7c871a609 (diff)
downloadmitmproxy-0510c9b111aed03d0d3680db63614d50f231745c.tar.gz
mitmproxy-0510c9b111aed03d0d3680db63614d50f231745c.tar.bz2
mitmproxy-0510c9b111aed03d0d3680db63614d50f231745c.zip
Client-side framework for web application
Diffstat (limited to 'web/src/vendor/react-router/docs/api/Router.md')
-rw-r--r--web/src/vendor/react-router/docs/api/Router.md65
1 files changed, 65 insertions, 0 deletions
diff --git a/web/src/vendor/react-router/docs/api/Router.md b/web/src/vendor/react-router/docs/api/Router.md
new file mode 100644
index 00000000..ff0a32f7
--- /dev/null
+++ b/web/src/vendor/react-router/docs/api/Router.md
@@ -0,0 +1,65 @@
+API: `Router`
+=============
+
+The main export, `Router`, contains several methods that may be used to
+navigate around the application.
+
+```js
+// cjs modules
+var Router = require('react-router')
+
+// or global build
+window.ReactRouter
+```
+
+Methods
+-------
+
+### `transitionTo(routeNameOrPath, [params[, query]])`
+
+Programmatically transition to a new route.
+
+#### Examples
+
+```js
+Router.transitionTo('user', {id: 10}, {showAge: true});
+Router.transitionTo('about');
+Router.transitionTo('/users/10?showAge=true');
+```
+
+### `replaceWith(routeNameOrPath, [params[, query]])`
+
+Programmatically replace current route with a new route. Does not add an
+entry into the browser history.
+
+#### Examples
+
+```js
+Router.replaceWith('user', {id: 10}, {showAge: true});
+Router.replaceWith('about');
+Router.replaceWith('/users/10?showAge=true');
+```
+
+### `goBack()`
+
+Programmatically go back to the last route and remove the most recent
+entry from the browser history.
+
+#### Example
+
+```js
+Router.goBack();
+```
+
+### `makeHref(routeName, params, query)`
+
+Creates an `href` to a route. Use this along with `ActiveState` when you
+need to build components similar to `Link`.
+
+#### Example
+
+```js
+// given a route like this:
+<Route name="user" path="users/:userId"/>
+Router.makeHref('user', {userId: 123}); // "users/123"
+```