A requirement comes up that, we need to develop an SDK so other platforms can connect with our Web Application.
Now I have created a new repository and set up a basic react code with Webpack (not using Create-React -App) and want to expose some functions in an index.js file like -
window.XAPI = {
connect: () => {},
disconnect: () => {},
getUserData: () => {}
};
Now as the above functions are exposed, and connect function is called (like a window.XAPI.connect()) by the third party who integrate our JS SDK, then our React.js APP should be open in a window with certain width and height so user can perform the connecting operations with our APP.
But I am not able to achieve the same, can anyone please help me in this. I am new to creating React.js SDK for third parties!