Skip to content

@lubusin/wp-frappe-data-store / useDocTypeDefinition

Function: useDocTypeDefinition()

useDocTypeDefinition(store, doctype): object & RequestStatus

Defined in: src/hooks.ts:89

React hook to retrieve normalized metadata for a Frappe DocType, loading it through the store resolver when needed.

Parameters

store

FrappeDataStore

The registered Frappe @wordpress/data store descriptor.

doctype

string

The Frappe DocType name.

Returns

object & RequestStatus

The definition and its loading/error state.

Released under the MIT License.