You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Glossary.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ A *redirect function* is used in [`onEnter` hooks](#enterhook) to trigger a tran
108
108
### Route
109
109
110
110
type Route = {
111
-
component: Component;
111
+
component: RouteComponent;
112
112
path: ?RoutePattern;
113
113
onEnter: ?EnterHook;
114
114
onLeave: ?LeaveHook;
@@ -118,6 +118,18 @@ A *route* specifies a [component](#component) that is part of the user interface
118
118
119
119
It may help to think of a route as an "entry point" into your UI. You don't need a route for every component in your component hierarchy, only for those places where your UI differs based on the URL.
120
120
121
+
### RouteComponent
122
+
123
+
type RouteComponent = Component;
124
+
125
+
The term *route component* refers to a [component](#component) that is directly rendered by a [route](#route) (i.e. the `<Route component>`). The router creates elements from route components and provides them as `this.props.children` to route components further up the hierarchy. In addition to `children`, route components receive the following props:
126
+
127
+
-`router` – The [router](#router) instance
128
+
-`location` – The current [location](#location)
129
+
-`params` – The current [params](#params)
130
+
-`route` – The [route](#route) that declared this component
131
+
-`routeParams` – A subset of the [params](#params) that were specified in the route's [`path`](#routepattern)
132
+
121
133
### RouteConfig
122
134
123
135
type RouteConfig = Array<Route>;
@@ -152,7 +164,7 @@ A *router* is a [`history`](http://rackt.github.io/history) object (akin to `win
152
164
There are two primary interfaces for computing a router's next [state](#routerstate):
153
165
154
166
-`history.listen` is to be used in stateful environments (such as web browsers) that need to update the UI over a period of time. This method immediately invokes its `listener` argument once and returns a function that must be called to stop listening for changes
155
-
-`history.match` is a pure function that does not update the history's internal state. This makes it ideal for server-side environments where many requests must be handled concurrently
167
+
-`history.match` is a pure asynchronous function that does not update the history's internal state. This makes it ideal for server-side environments where many requests must be handled concurrently
0 commit comments