cuddly-branch-99004
05/30/2023, 5:29 PMError: ReactDOMServer does not yet support Suspense.
on React 17/NextJS 12:
"@descope/react-sdk": "^1.0.4",
"next": "^12.2.5",
"react": "^17.0.2",
Descope’s SDK shows that it should support React 16:
https://github.com/descope/react-sdk/blob/282d535d6687430cf1bc5b0c34e2e2f8fc746236/package.json#L115
Is there anyway to disable Suspense for the <Descope/>
React component that I’m missing?square-vr-55083
05/30/2023, 5:31 PMgreat-diamond-35515
05/30/2023, 5:56 PMcuddly-branch-99004
05/30/2023, 6:04 PM<Descope/>
React component as part of our NextJS application. We weren’t planning on preventing it from rendering on the server, so I believe the answer is “yes”, we would render the Descope Flow.cuddly-branch-99004
05/30/2023, 6:04 PM"@descope/react-sdk": "^1.0.4",
great-diamond-35515
05/30/2023, 9:39 PMgreat-diamond-35515
05/31/2023, 11:00 AMgreat-diamond-35515
05/31/2023, 5:54 PMcuddly-branch-99004
05/31/2023, 6:16 PMbreezy-evening-56597
cuddly-branch-99004
06/05/2023, 8:07 PMimport dynamic from 'next/dynamic';
import type { Descope } from '@descope/react-sdk';
const DescopeWrapper = dynamic(() => import('@descope/react-sdk').then((module) => module.Descope), {
ssr: false,
}) as typeof Descope;
Without the as
cast I get this type error:
Types of parameters 'nextProps' and 'nextProps' are incompatible.
Type 'Readonly<{}>' is not assignable to type 'never'.ts(2345)
breezy-evening-56597
great-diamond-35515
06/06/2023, 7:40 AMdynamic
api, this is similar to how it is done in the sample-app example
const DescopeWC = dynamic(
async () => {
const { Descope } = await import("@descope/react-sdk");
return (props: React.ComponentProps<typeof Descope>) => (
<Descope {...props} />
);
},
{
ssr: false,
}
);
from my understanding - Descope roadmap should have a dedicated next-sdk which should encapsulate this part