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
| handleData | Function(data: any, state: ReactUseApi.State) || A callback function to deal with the data of the API's response. **IMPORTANT** Using any state setter in handleData is dangerous, which will cause the component re-rendering infinitely while SSR rendering. |
201
-
| dependencies | Object || The additional needed data using in handleData. `NOTE`: "dependencies" is supposed to immutable due to React's rendering policy. |
202
-
| shouldRequest | Function || A callback to decide whether useApi re-fetches the API when re-rendering. Returning true will trigger useApi to re-fetch. This option is helpful if you want to re-request an API when a route change occurs. |
203
-
| watch | any[]|[]| An array of values that the effect depends on, this is the same as the second argument of useEffect. |
| handleData | Function(data: any, state: ReactUseApi.State) || A callback function to deal with the data of the API's response. **IMPORTANT** Using any state setter in handleData is dangerous, which will cause the component re-rendering infinitely while SSR rendering. |
201
+
| dependencies | Object || The additional needed data using in handleData. `NOTE`: "dependencies" is supposed to immutable due to React's rendering policy. |
202
+
| shouldRequest | Function || A callback to decide whether useApi re-fetches the API when `only re-rendering`. Returning true will trigger useApi to re-fetch. This option is helpful if you want to re-request an API when a route change occurs. |
203
+
| watch | any[]|[]| An array of values that the effect depends on, this is the same as the second argument of useEffect. |
0 commit comments