Closed cr3ative closed 4 years ago
Hi Paul - just wanted to apologize for the radio silence on this issue.
You're right that this was introduced in 3.19, since the error is coming from createContext
, which was the most recently merged PR (#529). It looks like the issue is actually a build configuration error in preact-context - I'll try to find a fix there.
This should be fixed!
Hi there,
I'm really sorry that I couldn't find a simple way to replicate this with demo code, but hopefully I can be descriptive.
We use a mixed Preact/React stack at the moment, and use
preact-render-to-string
to dump out the DOM to provide server-side rendering.When our packages automatically updated to include
preact-compat
3.19.0, SSR broke, with the following stack trace:This rendering kit uses a React component (CdnImage) and
preact-compat
fails when this line, in that component, is imported:import React, { Component } from 'react';
Something in there is relying on
window
and we've bisected it to 3.19.0I hope that helps. I'm sorry again for being so vague.