Skip to main content
usePluginContext returns the full PluginUIContext object that the shell injects into every plugin’s React tree via PluginShellProvider. It is the foundational hook — all other shell utility hooks (useShellAuth, useShellToast, etc.) call it internally.

Import

Signature

Return value

See PluginUIContext for the full shape. The nested types referenced by PluginUIContext are also documented in the Type Reference:

Usage

Notes

  • Convenience wrappers like useShellAuth, useShellToast, etc. are available if you only need a single field from the context. They call usePluginContext() internally.
  • The socket field is the plugin-scoped bridge to your own background module’s ctx.ipc.send broadcasts. For high-frequency simulator data sourced from outside your plugin, use useSimData or useSocket instead.