IFluidConverter Interface

Packages > @fluidframework/react > IFluidConverter

Fluid converters to take the view state value that they are keyed against in the ViewToFluid map and convert them into their synced Fluid state counterparts

Signature:

export interface IFluidConverter<SV extends IViewState, SF extends IFluidState> 

Properties

List of properties of this interface
Property Type Description
fluidConverter (viewState: SV, fluidState: Partial) => any A callback that takes in the partial view state containing the value that this converter maps to, and optionally returns a value. This value will be automatically set on the synced state under the view key this converter maps to
fluidKey keyof SF The corresponding value within the Fluid state
type string The type of object this key in the view state holds

Events

fluidConverter

A callback that takes in the partial view state containing the value that this converter maps to, and optionally returns a value. This value will be automatically set on the synced state under the view key this converter maps to

Signature:

fluidConverter?: (viewState: SV, fluidState: Partial<SF>) => any;

fluidKey

The corresponding value within the Fluid state

Signature:

fluidKey: keyof SF;

type

The type of object this key in the view state holds

Signature:

type: string;