The React SDK Components repo is used to create the @pega/react-sdk-components and @pega/react-sdk-overrides npm packages used by the Pega Constellation React SDK. These packages provide the initial set of components used by the React SDK to render DX Components with a design system other than Pega Constellation design system.
// If the new component is a reference node then mark with a unique key
if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {
finalProps.key = this.getKey();
}
// console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);
return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;
Code that fixes the error:
// If the new component is a reference node then mark with a unique key
if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {
return <this.Control {...finalProps} key={this.getKey()}>{this.createChildren()}</this.Control>;
}
// console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);
return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;
Describe the bug An error that frequently pops into the (chrome) console is:
To Reproduce Steps to reproduce the behavior:
Expected behavior No error.
Screenshots
Additional context
The error is causes by:
https://github.com/pegasystems/react-sdk-components/blob/master/packages/react-sdk-components/src/bridge/react_pconnect.jsx:284-290
Current code:
Code that fixes the error: