PluginProvider
This component provides an interface to plugin apis for other components in the tree. It should
be provided with a single Plugin
prop that must point to plugin
(your plugin's root instance).
You do not have to use this component unless you want custom mouse icons via the useMouseIcon hook. Right now, the only built-in component that relies on this is Splitter. Theming and all other functionality will work regardless of whether this component is used.
You should only render one PluginProvider in your tree. Commonly, this is done at the top of the tree with the rest of your plugin as children/descendants.
Example of usage:
local function MyComponent()
return React.createElement(StudioComponents.PluginProvider, {
Plugin = plugin,
}, {
MyExample = React.createElement(MyExample, ...)
})
end