Plugin SDK for Ionic Portals
npm install @ionic/portals
getInitialContext<T = unknown>() => any
Returns: any
publish<TData>(message: PortalMessage<TData>) => any
Returns: any
subscribe<T = unknown>(options: SubscribeOptions, callback: SubscriptionCallback<T>) => any
Param |
Type |
options |
SubscribeOptions |
callback |
(result: { topic: string; data: T; }) => void |
Returns: any
unsubscribe(options: PortalSubscription) => any
Returns: any
Prop |
Type |
name |
string |
value |
T |
assets |
{ [key: string]: string; } |
Prop |
Type |
topic |
string |
data |
TData |
Prop |
Type |
subscriptionRef |
number |
topic |
string |