From 2f252f98fc79a048cc6397dd7194314ed652266a Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Wed, 17 Nov 2021 13:13:24 -0500 Subject: [PATCH 1/3] Make render nothing on the client --- packages/remix-react/components.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/remix-react/components.tsx b/packages/remix-react/components.tsx index 6f2b5e4e2e2..7a1e44668da 100644 --- a/packages/remix-react/components.tsx +++ b/packages/remix-react/components.tsx @@ -672,15 +672,25 @@ type ScriptProps = Omit< | "suppressHydrationWarning" >; +export const Scripts = + typeof document === "undefined" ? ServerScripts : ClientScripts; + +/** + * Browser implementation of , which does nothing. + */ +function ClientScripts(props: ScriptProps) { + return null; +} + /** - * Renders the `