Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Last active October 14, 2020 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljmotta/1770031f223ffb155feaf5245525f848 to your computer and use it in GitHub Desktop.
Save ljmotta/1770031f223ffb155feaf5245525f848 to your computer and use it in GitHub Desktop.
PingPongReactImplFactory
import { MessageBusClientApi } from "@kogito-tooling/envelope-bus/dist/api";
// ...
export class PingPongReactImplFactory implements PingPongFactory {
public create(initArgs: PingPongInitArgs, channelApi: MessageBusClientApi<PingPongChannelApi>) {
const ref = React.createRef<PingPongApi>();
const pingPongView: PingPong = {
reactComponent: () => <PingPongReactImpl initArgs={initArgs} channelApi={channelApi} ref={ref} />,
};
return pingPongView;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment