# usePlugin

Retrieve a plugin from the FireflyRuntime instance.

# Reference

const plugin = usePlugin(pluginName)

# Parameters

  • pluginName: The name of the plugin.

# Returns

A plugin instance if the plugin has been registered, otherwise an Error is thrown.

# Usage

import { usePlugin } from "@squide/firefly";
import { MyPlugin } from "@sample/my-plugin";

const myPlugin = usePlugin(MyPlugin.name);