Function: usePluginClientConfig()
usePluginClientConfig<
T>(pluginName):T
Returns the client-side config exposed by a plugin’s clientConfig() method.
The value is read once from the boot-time <script id="__appkit__"> payload
and cached for the lifetime of the component. Because clientConfig() runs
at server startup, the data is static and never changes during a session.
Type Parameters
Section titled “Type Parameters”T = Record<string, unknown>
Parameters
Section titled “Parameters”pluginName
Section titled “pluginName”string
The plugin name as registered in AppKit (e.g. "files")
Returns
Section titled “Returns”T
The plugin’s client config object, typed via the generic parameter
Example
Section titled “Example”interface FilesConfig { volumes: string[] }
function MyComponent() { const { volumes } = usePluginClientConfig<FilesConfig>("files"); return <ul>{volumes.map(v => <li key={v}>{v}</li>)}</ul>;}