Documentation
    Preparing search index...

    Class AssetSnapshotRenderPlugin

    Hierarchy

    • RendererPluginBase<Events>
      • AssetSnapshotRenderPlugin

    Implements

    • RendererPlugin
    • StatefulRendererPlugin<StoreApi<Store>>
    Index

    Constructors

    Properties

    emitter: Emitter<Events> = ...

    An event emitter for handling custom events.

    Methods

    • Adds an event listener for a specific event.

      Type Parameters

      • K extends "onActiveChanged"

        The type of the event key.

      Parameters

      • event: K

        The event to listen to.

      • listener: (eventData: Events[K]) => void

        The callback function to be invoked when the event is emitted.

      Returns { remove: () => void }

      An object with a remove method to unsubscribe the listener.

    • Registers an event listener handle to be managed by the plugin. Managed listeners will be automatically removed when the plugin is torn down.

      Parameters

      • handle: { remove: () => void } | (() => void)

        The event listener handle to manage.

      Returns void

    • The store used by the plugin.

      Returns StoreApi<Store>

      Do not use this directly in user-land code. Either:

      • In React code, use the usePluginStore hook.
      • In non-React code, add methods to mutate the store to the plugin's API instead.
    • Tears down the plugin by removing all managed event listeners and clearing the event emitter. This method is called when the plugin is being destroyed.

      Parameters

      • _context: RendererPluginContext

        The plugin context provided during teardown.

      Returns void