Skip to content

Instantly share code, notes, and snippets.

@developit
Created December 16, 2021 01:43
Show Gist options
  • Save developit/0b77758701408ab043b3cac7d4e5ac97 to your computer and use it in GitHub Desktop.
Save developit/0b77758701408ab043b3cac7d4e5ac97 to your computer and use it in GitHub Desktop.
import ReactDOM from "react-dom";
import { RemixBrowser } from "remix";
// hydrate a fake Document with the patch:
ReactDOM.hydrate(<RemixBrowser />, {
childNodes: [document.documentElement],
firstChild: document.documentElement,
appendChild(n) { document.replaceChild(n, document.documentElement); },
insertBefore(n) { this.appendChild(n); }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment