From 110a4799387b15662bf089bb2806c29b21405dd3 Mon Sep 17 00:00:00 2001 From: Josh Ellis Date: Thu, 3 Dec 2020 23:32:32 +0000 Subject: [PATCH] docs: update to include 'all' value returned from renderHook --- docs/api-reference.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/api-reference.md b/docs/api-reference.md index b04f3739..42b7288b 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -63,13 +63,17 @@ The `renderHook` function returns an object that has the following properties: ```js { + all: Array current: any, error: Error } ``` -The `current` value or the `result` will reflect whatever is returned from the `callback` passed to -`renderHook`. Any thrown values will be reflected in the `error` value of the `result`. +The `current` value or the `result` will reflect the latest of whatever is returned from the +`callback` passed to `renderHook`. Any thrown values from the latest call will be reflected in the +`error` value of the `result`. The `all` value is an array containing all the returns (including the +most recent) from the callback. These could be `result` or an `error` depending on what the callback +returned at the time. ### `rerender`