Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ParcelObject<ExtraProps>

Parcel object, similar to React.Element with the only difference that it is mutable. While ParcelConfig is a React.Component.

Type parameters

  • ExtraProps

Hierarchy

  • ParcelObject

Index

Properties

bootstrapPromise

bootstrapPromise: Promise<null>

Returns a promise that will resolve once the parcel has been bootstrapped.

loadPromise

loadPromise: Promise<null>

Returns a promise that will resolve once the parcel has been loaded.

mountPromise

mountPromise: Promise<null>

Returns a promise that will resolve once the parcel has been mounted. This is helpful for knowing exactly when a parcel has been appended to the DOM

unmountPromise

unmountPromise: Promise<null>

Returns a promise that will resolve once the parcel has been unmounted.

Methods

getStatus

  • getStatus(): "NOT_LOADED" | "LOADING_SOURCE_CODE" | "NOT_BOOTSTRAPPED" | "BOOTSTRAPPING" | "NOT_MOUNTED" | "MOUNTING" | "MOUNTED" | "UPDATING" | "UNMOUNTING" | "UNLOADING" | "SKIP_BECAUSE_BROKEN" | "LOAD_ERROR"
  • Returns a string of that parcels status. The string status is one of the following:

    Returns "NOT_LOADED" | "LOADING_SOURCE_CODE" | "NOT_BOOTSTRAPPED" | "BOOTSTRAPPING" | "NOT_MOUNTED" | "MOUNTING" | "MOUNTED" | "UPDATING" | "UNMOUNTING" | "UNLOADING" | "SKIP_BECAUSE_BROKEN" | "LOAD_ERROR"

mount

  • mount(): Promise<null>
  • Returns a promise that resolves once the parcel is successfully mounted. The promise can throw an error which needs to be handled.

    Returns Promise<null>

unmount

  • unmount(): Promise<null>
  • Returns a promise that resolves once the parcel is successfully unmounted. The promise may throw an error which needs to be handled.

    Returns Promise<null>

Optional update

  • update(customProps: ExtraProps): Promise<null>
  • Allows you to change the props passed into a parcel. Note that not all parcels support being updated. The update function returns a promise that resolves when the parcel is finished updating. See other documentation and example for more information.

    Parameters

    • customProps: ExtraProps

    Returns Promise<null>

Generated using TypeDoc