IBM Cloud - App ID giving error with React 18

82 Views Asked by At

Am trying the App ID with React example from - https://www.ibm.com/cloud/blog/secure-your-single-page-react-apps-using-app-id. The following code snippet is giving error typeError: (0 , ibmcloud_appid_js__WEBPACK_IMPORTED_MODULE_0__.AppID) is not a function.

Am using React 18. Any suggestion on this?

const appID = useMemo(() => {
    return new AppID();
  }, []);

Am expecting the application to run without error and App ID should be able to intercept with logon request.

0

There are 0 best solutions below