sp adaptive card extension base.viewnavigator.register - microsoft/Viva-Connections-Extensibility-Beta GitHub Wiki

Home > @microsoft/sp-adaptive-card-extension-base > ViewNavigator > register

ViewNavigator.register() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Registers a new view.

Signature:

register(id: string, initializer: () => TView): void;

Parameters

Parameter Type Description
id string Unique identifier for the view.
initializer () => TView Function that returns a new view, which is only called if no view with the id already exists.

Returns:

void

Remarks

A View with a given id is only initialized once, and the instance is reused if it is pushed more than once

⚠️ **GitHub.com Fallback** ⚠️