Open Blackglade opened 3 years ago
Not really, but this looks interesting. We'd have to rewrite the runtime in a way that doesn't rely on window variables.
You can use react-spline
on NextJs by using this:
import dynamic from "next/dynamic";
const DynamicComponentWithNoSSR = dynamic( () => import("../components/spline/MyComponent"), { ssr: false } );
Then use it as a normal component
<DynamicComponentWithNoSSR />
Thanks @adalbertopc. I ended up doing something similar to this.
Using React-based frameworks like NextJS or GatsbyJS causes issues with server side rendering / generation due to the fact that the window obj is undefined at build time (see attached screenshot). Possible to patch a fix that prevents this issue?