Capítulo 776 de 988
State in the Editor Starter is managed with the built-in React state management utilities: useState() and useContext().
type DeletedAsset = {
remoteUrl: string | null;
remoteFileKey: string | null;
assetId: string;
statusAtDeletion: AssetState;
};
export type UndoableState = {
tracks: TrackType[];
assets: Record<string, EditorStarterAsset>;
items: Record<string, EditorStarterItem>;
fps: number;
compositionWidth: number;
compositionHeight: number;
deletedAssets: DeletedAsset[];
};
export type EditorState = {
undoableState: UndoableState;
selectedItems: string[];
textItemEditing: string | null;
textItemHoverPreview: TextItemHoverPreview | null;
itemSelectedForCrop: string | null;
renderingTasks: RenderingTask[];
captioningTasks: CaptioningTask[];
initialized: boolean;
itemsBeingTrimmed: ItemBeingTrimmed[];
loop: boolean;
assetStatus: Record<string, AssetState>;
};