registerComponentCreator(creator)
Registers the component creator function.
Returns
Not applicable.
Parameters
Name | Type | Description | Required |
creator | function | The function that is called to register a component creator. | ✅ |
Usage example
In this example, the API registers the component creator function, which will be used by all rendered components to create the component instance.
PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {
return React.createElement(PConnectHOC(), {
...c11nEnv,
...c11nEnv.getPConnect().getConfigProps(),
...c11nEnv.getPConnect().getActions(),
...{ additionalProps }
});
Previous topic onPCoreReady(callback) Next topic registerLocaleManager(customLocaleUtilApis)