webcomponent/WebComponentSDK
The Webcomponent SDK is tailored for using Myop components packaged as separate bundles and exposed as web components.
Developers importing this SDK can leverage APIs and utilities specifically crafted to support the lifecycle management and communication patterns required for web components within the Myop architecture.
This SDK promotes reusability and encapsulation, enabling developers to build modular, self-contained components that can be seamlessly integrated into the host application's DOM structure.
Once loaded the RootSDK
, you can load the IframeSDK
const {WebComponentSDK} = (await window.myop.rootSDK.getWebcomponentModule());
or
import {getWebcomponentModule} from '@myop/sdk';
const {WebComponentSDK} = (await getWebcomponentModule());
or
import {WebComponentSDK} from '@myop/sdk/webcomponent';