use Operation
Type: Function
How to get useOperation?
JavaScript
import useOperation from 'fontoxml-fx/src/useOperation.js'
A React hook which allows you to get the context for an operation based on the provided operationName and operationData. Additionally this hook provides you with an executeOperation function.
Arguments
operation
Name (Required)
Type: OperationName
The operationName to retrieve the context for. Defaults to 'do-nothing' if falsy.
Default value
operation
Data (Required)
Type: OperationData | NULL
The operationData to pass to the operation.
Default value
options
(Optional)
Type: Object
Properties
Default value
Returns
Type: UseOperationResult