Props
Name | Type | Default | Description |
---|---|---|---|
for | oneOfType([ instanceOf(Promise), func ]) | - | The promise we need to wait for, or a function that will return one which will be evaluated lazily, in the component's constructor |
tap | func | - | Takes an error and a response argument and is called when the promise is fulfilled. Use this to perform side-effects or just for debugging purposes. |
onPromise | func | - | Takes a single argument that will be the promise returned from the function passed through the for prop. Useful for keeping track of the first promise. Will not be called if we already pass a Promise to the for prop. |