useDocument
A hook for asynchronously working with documents.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
dataSourceId | string | False | The ID of the data source |
documentId | string | False | The ID of the document |
depth | number | True | The maximum depth level of nested objects to resolve |
Returns
A list containing the document, a boolean representing the loading state, a function to update the document, and an Error, if any.
Usage
Code example: