Skip to content

Format the request result ​

v1 use ​

Since v1 version useRequest needs to guarantee a good plug-in system, format is too invasive for the system, the formatting here is useFormatResult, format data to useFormatResult after the request data is completed, useFormatResult can well support typescript type prompt.

Jump to useFormatResult

v2 use ​

It now supports ts types very well.

Options ​

PropertyDescriptionTypeDefault
formatResultformat the request result(response: TData) => FormatData-

Source ​

Document · Demo

Released under the MIT License.