aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/vendor/react-router/docs/api/misc
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/misc
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/misc')
-rw-r--r--web/src/vendor/react-router/docs/api/misc/Location.md66
-rw-r--r--web/src/vendor/react-router/docs/api/misc/transition.md24
2 files changed, 90 insertions, 0 deletions
diff --git a/web/src/vendor/react-router/docs/api/misc/Location.md b/web/src/vendor/react-router/docs/api/misc/Location.md
new file mode 100644
index 00000000..f0b2077b
--- /dev/null
+++ b/web/src/vendor/react-router/docs/api/misc/Location.md
@@ -0,0 +1,66 @@
+API: `Location` (object)
+==========================
+
+You can supply the router with your own location implementation. The
+following methods must be implemented:
+
+Methods
+-------
+
+### `setup(onChange)`
+
+Called when the router is first setup. Whenever an external actor should
+cause the router to react, call `onChange` (for example, on
+`window.hashchange`).
+
+### `teardown`
+
+Called when the router is torn down.
+
+### `push`
+
+Called when the router is transitioning from one path to another.
+
+### `replace`
+
+Called when ther router is replacing (not transitioning) one url with
+another.
+
+### `pop`
+
+Called when the router attempts to go back one entry in the history.
+
+### `getCurrentPath`
+
+Should return the current path as a string.
+
+### `toString`
+
+Should return a useful string for logging and debugging.
+
+Example
+-------
+
+This is a terrible example, you're probably better off looking at the
+implementations in this repository.
+
+```js
+var MyLocation = {
+
+ setup: function (onChange) {},
+
+ teardown: function () {},
+
+ push: function (path) {},
+
+ replace: function (path) {},
+
+ pop: function () {},
+
+ getCurrentPath: function () {},
+
+ toString: function () {}
+
+};
+```
+
diff --git a/web/src/vendor/react-router/docs/api/misc/transition.md b/web/src/vendor/react-router/docs/api/misc/transition.md
new file mode 100644
index 00000000..fc039572
--- /dev/null
+++ b/web/src/vendor/react-router/docs/api/misc/transition.md
@@ -0,0 +1,24 @@
+API: `transition` (object)
+==========================
+
+This object is sent to the [transition hooks][transition-hooks] as the
+first argument.
+
+Methods
+-------
+
+### `abort()`
+
+Aborts a transition.
+
+### `redirect(to, params, query)`
+
+Redirect to another route.
+
+### `retry()`
+
+Retrys a transition. Typically you save off a transition you care to
+return to, finish the workflow, then retry.
+
+ [transition-hooks]:/docs/api/components/RouteHandler.md#static-lifecycle-methods
+