|
16 | 16 | * [Register with the Hapi server](#register-with-the-hapi-server)
|
17 | 17 | * [Optional custom renderer that passes blankie (optional to provide yourself) nonces as a prop](#optional-custom-renderer-that-passes-blankie-optional-to-provide-yourself-nonces-as-a-prop)
|
18 | 18 | * [Dependencies for you to provide](#dependencies-for-you-to-provide)
|
| 19 | + * [Redial fetch trigger arguments](#redial-fetch-trigger-arguments) |
19 | 20 | * [Contribution](#contribution)
|
20 | 21 | * [Install dependencies](#install-dependencies)
|
21 | 22 | * [Verification](#verification)
|
@@ -48,7 +49,8 @@ to direct all `text/html` requests to this `/html` route.
|
48 | 49 | In addition, [redial](https://github.com/markdalgleish/redial) `fetch` hooks
|
49 | 50 | will be triggered and rendering will wait for all related requests to complete.
|
50 | 51 | This enables populating the data store based on the components that are mounted
|
51 |
| -for the current route. |
| 52 | +for the current route. See [redial arguments](#redial-fetch-trigger-arguments) |
| 53 | +for the list of arguments supplied to triggered fetches. |
52 | 54 |
|
53 | 55 | ### Example
|
54 | 56 |
|
@@ -125,6 +127,16 @@ required.
|
125 | 127 | provider component.
|
126 | 128 | * `render`: _optional_ custom renderer to replace the default renderer. Passed `defaultRenderer` and `request` as arguments so additional props can be passed to the defaultRenderer, potentially from the request.
|
127 | 129 |
|
| 130 | +### Redial fetch trigger arguments |
| 131 | + |
| 132 | +* `params`: pass-through of react-router params taken from the path |
| 133 | +* `dispatch`: redux store [dispatch](https://redux.js.org/api/store/#dispatchaction) method |
| 134 | +* `state`: current state of the redux store |
| 135 | +* `getState`: [method](https://redux.js.org/api/store/#getstate) to get the |
| 136 | + latest state of the redux store |
| 137 | +* `store`: the raw redux store. :warning: WARNING: this should only be used for |
| 138 | + unique circumstances (e.g., creating a custom subscription to the store) |
| 139 | + |
128 | 140 | ## Contribution
|
129 | 141 |
|
130 | 142 | [](http://commitizen.github.io/cz-cli/)
|
|
0 commit comments