Skip to content

Instantly share code, notes, and snippets.

Emotion + Streaming SSR + Suspense

Note: This document describes a workaround for a known limitation in Emotion's handling of React 18+ streaming SSR with Suspense. This should be considered a temporary fix until Emotion or the React ecosystem provides first-class support.

The Problem

Hydration mismatch errors occur when using Emotion (or Emotion-based libraries like Material-UI, Chakra UI) with React 18+ streaming SSR and Suspense boundaries.

Root Cause

@evanweible-wf
evanweible-wf / manifest.yaml
Last active October 31, 2024 22:29
Testing bundle manifest
version: 1
microfrontends:
mfeToKeep:
apps: [task_portal, wdesk]
extensions: {}
@evanweible-wf
evanweible-wf / main.dart
Created April 5, 2023 23:32
dashing-kingdom-4998
class DisposableWCommonV2 {
Future<Null> onDispose() async {}
}
class DisposableWCommonV3 {
Future<void> onDispose() async {}
}
class NullTypeOnV2 extends DisposableWCommonV2 {