Skip to main content

HostHookClient

interface

Registers interceptors at runtime. Use this when the decision needs code. The declarative `hook.beforeAction` contribution covers the common case of gating an action behind a condition and gives the host a title to show the user.

interface HostHookClient

Import

import { HostHookClient } from '@modular/sdk';

Members1

beforeAction
<K extends string>(action: K, interceptor: HostActionInterceptor<NormalizeModularActionReference<K>>) => Disposable

Runs `interceptor` before every dispatch of `action`. Dispose to stop.

Notes

category
Context