Home > @uniformdev/canvas-react > convertComponentToProps

convertComponentToProps() function

Converts a raw Canvas component instance to React component props format. This merges each parameter moved to the root object and removes the 'value' node, hugely simplifying rendering code. For example if the raw object has parameters.foo.value, then the final props have props.foo === raw.parameters.foo.value.

Signature:

Parameters

ParameterTypeDescription
componentComponentInstance

Returns:

ComponentProps<T>