createPConnect(config)
Creates a PConnect object from the input configuration of a component. The PConnect object represents a newly created component context for the given input configuration and has access to all public PConnect APIs.
Returns
A PConnect object created from the configuration data.
Parameters
Name | Type | Description | Required |
config | object | The payload used to create a PConnect object. | ✅ |
Usage example
In this example, the API creates a PConnect object based on the input configuration of the config object.
const config = {
"meta": {
"type": "Button",
"config": {
label: "@P .Submit"
}
}
}
const ButtonComponentPConnect = createPConnect(config);
Previous topic configureForBrowserBookmark(payload) Next topic getAnalyticsUtils()