Skip to content
On this page

useFormatResult

Format the data of hook.

Code demonstration

API

const formatData = useFormatResult(data, callback)
const formatData = useFormatResult(data, callback)

Argument

PropertyDescriptionTypeDefault
dataData that needs to be formattedTData\|Ref<TData>-
callbackFormatt function(data: TData) => FData-

Result

PropertyDescriptionType
formatDataThe formatted dataComputedRef<FData> | FData

Source

SourceDocsDemo