Skip to main content

Loader Class

Manages Fluid resource loading

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-loader/legacy.

For more information about our API support guarantees, see here.

Signature

export declare class Loader implements IHostLoader

Implements: IHostLoader

Remarks

The Loader class is deprecated and will be removed in a future release. Use the free-form functions instead (See issue #24450 for more details). \

Constructors

Constructor Alerts Description
(constructor)(loaderProps) Beta Constructs a new instance of the Loader class

Properties

Property Alerts Modifiers Type Description
services Beta readonly ILoaderServices

Methods

Method Alerts Return Type Description
createDetachedContainer(codeDetails, createDetachedProps) Beta Promise<IContainer>
rehydrateDetachedContainerFromSnapshot(snapshot, createDetachedProps) Beta Promise<IContainer>
resolve(request, pendingLocalState) Beta Promise<IContainer>

Constructor Details

(constructor)

Constructs a new instance of the Loader class

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
constructor(loaderProps: ILoaderProps);

Parameters

Parameter Type Description
loaderProps ILoaderProps

Property Details

services

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
readonly services: ILoaderServices;

Type: ILoaderServices

Method Details

createDetachedContainer

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
createDetachedContainer(codeDetails: IFluidCodeDetails, createDetachedProps?: {
canReconnect?: boolean;
clientDetailsOverride?: IClientDetails;
}): Promise<IContainer>;

Parameters

Parameter Modifiers Type Description
codeDetails IFluidCodeDetails
createDetachedProps optional { canReconnect?: boolean; clientDetailsOverride?: IClientDetails; }

Returns

Return type: Promise<IContainer>

rehydrateDetachedContainerFromSnapshot

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
rehydrateDetachedContainerFromSnapshot(snapshot: string, createDetachedProps?: {
canReconnect?: boolean;
clientDetailsOverride?: IClientDetails;
}): Promise<IContainer>;

Parameters

Parameter Modifiers Type Description
snapshot string
createDetachedProps optional { canReconnect?: boolean; clientDetailsOverride?: IClientDetails; }

Returns

Return type: Promise<IContainer>

resolve

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;

Parameters

Parameter Modifiers Type Description
request IRequest
pendingLocalState optional string

Returns

Return type: Promise<IContainer>