Skip to content

@sqlrooms/webcontainer / createWebContainerSlice

Function: createWebContainerSlice()

createWebContainerSlice(props?): StateCreator<WebContainerSliceState>

Parameters

ParameterTypeDescription
props?{ config?: Partial<{ filesTree: FileSystemTree; openedFiles: object[]; activeFilePath: string | null; }>; autoInitialize?: boolean; }-
props.config?Partial<{ filesTree: FileSystemTree; openedFiles: object[]; activeFilePath: string | null; }>-
props.autoInitialize?booleanWhether room-level slice initialization should eagerly boot WebContainer. Disable this when runtime startup should happen only on explicit user action.

Returns

StateCreator<WebContainerSliceState>