As a quick fix, in Plasmic, we allow you to remove the React.Suspense
by using the flags disableLoadingBoundary={true}
and disableRootLoadingBoundary={true}
in your <PlasmicRootProvider/>
instance.
In your example:
<PlasmicRootProvider
loader={PLASMIC}
prefetchedData={props.plasmicData}
disableLoadingBoundary={true}
disableRootLoadingBoundary={true}
>
You should also not use the LoadingBoundary
component in the Studio to avoid adding additional React.Suspense
.
But there are some consequences to that. The main reason we have React.Suspense
is to power Backend data integrations | Learn Plasmic usage in Plasmic projects. So, by disabling it, you may face unintended issues if you are using Plasmic data integrations to perform data fetching in your application. If you solely fetch data in SSG or SSR, it should be fine to disable it from your client.
This error seems to be visible in other combinations of hooks in a nondeterministic way, and it seems to have similar reasons as in the linked issue.