usePlugin
A hook used to obtain a reference to the root plugin instance associated with the current plugin. It requires a single PluginProvider to be present higher up in the tree.
local function MyComponent()
local plugin = usePlugin()
...
end
A hook used to obtain a reference to the root plugin instance associated with the current plugin. It requires a single PluginProvider to be present higher up in the tree.
local function MyComponent()
local plugin = usePlugin()
...
end
{
"functions": [],
"properties": [],
"types": [],
"name": "usePlugin",
"desc": "A hook used to obtain a reference to the root [plugin](https://create.roblox.com/docs/reference/engine/classes/Plugin)\ninstance associated with the current plugin. It requires a single [PluginProvider] to be present \nhigher up in the tree.\n\n```lua\nlocal function MyComponent()\n\tlocal plugin = usePlugin()\n\t...\nend\n```",
"source": {
"line": 15,
"path": "src/Hooks/usePlugin.luau"
}
}