@astrakraft/pega-react-sdk
v0.0.5
Published
This README would normally document whatever steps are necessary to get your application up and running.
Downloads
2
Readme
Pega Constellation React Utilities
Overview
@astrakraft/pega-react-sdk
is a collection of React utilities designed to simplify working with Pega Constellation. These utilities aim to streamline the development process, providing easy-to-use, reusable functions and components built specifically for Pega Constellation applications.
Features
- Component Wrappers: Ready-to-use React components for common Pega Constellation elements.
- Utility Functions: Helper functions to handle Pega Constellation-specific tasks.
Installation
To install the package, run:
npm install @astrakraft/pega-react-sdk
Or with yarn:
yarn add @astrakraft/pega-react-sdk
Usage
Importing Components and Utilities
Here's a basic example of how to use the library:
import React from 'react';
import { withConstellationWrapper } from '@astrakraft/pega-react-sdk';
const AstrakraftWrapper = withConstellationWrapper('theEmbed', YourWidget, onMountReady);
function onMountReady(rootElement) {
...
}
const App = () => {
return (
<div>
<h1>Pega Constellation React Utilities Example</h1>
<AstrakraftWrapper widgetProp1 otherProps/>
</div>
);
};
export default App;
API
Utilities
withConstellationWrapper
A HOC wrapper for making a widget compatible with pega embed to legacy UI kit implementation.
ConsgellationWidget
(string): A constellation widget checked in as DX component.onMountReady
(function) : A callback function that is called when the widget is ready to be mounted- Returns: A wrapped HOC component that makes a constellation widget compatible with UI Kit.
Contact
For any issues, questions, or suggestions, please reach us at [email protected]