Loader Class
Manages Fluid resource loading
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
For more information about our API support guarantees, see here.
Signature
constructor(loaderProps: ILoaderProps);
Parameters
| Parameter | Type | Description |
|---|---|---|
| loaderProps | ILoaderProps |
Property Details
services
For more information about our API support guarantees, see here.
Signature
readonly services: ILoaderServices;
Type: ILoaderServices
Method Details
createDetachedContainer
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
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
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>