useOperation

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

  1. operationName

    (Required)

    Type: OperationName

    The operationName to retrieve the context for. Defaults to 'do-nothing' if falsy.

    Default value

  2. operationData

    (Required)

    Type: OperationData | NULL

    The operationData to pass to the operation.

    Default value

  3. options

    (Optional)

    Type: Object

    Properties

    Default value

Returns