-
- {/* this will not render */}
-
- {/* this will get rendered */}
-
+export default function HeadPage() {
+ const [shouldReverseScriptOrder, reverseScriptOrder] = React.useReducer(
+ (b) => !b,
+ false
+ )
+ const [shouldInsertScript, toggleScript] = React.useReducer((b) => !b, false)
- {/* this will not render */}
-
- {/* this will override the default */}
-
+ const scriptAsyncTrue =
+ const scriptAsyncFalse = (
+
+ )
-
+ return (
+
+
+ {/* this will not render */}
+
+ {/* this will get rendered */}
+
- {/* this will not render the content prop */}
-
+ {/* this will not render */}
+
+ {/* this will override the default */}
+
- {/* allow duplicates for specific tags */}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+ {/* this will not render the content prop */}
+
- {/* both meta tags will be rendered since they use unique keys */}
-
-
+ {/* allow duplicates for specific tags */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Fragment title
-
-
+
+
- {/* the following 2 link tags will both be rendered */}
-
-
+ {/* both meta tags will be rendered since they use unique keys */}
+
+
- {/* only one tag will be rendered as they have the same key */}
-
-
+
+ Fragment title
+
+
- {/* this should not execute twice on the client */}
-
- {/* this should have async set to false on the client */}
-
- {/* this should not execute twice on the client (intentionally sets defer to `yas` to test boolean coercion) */}
-
+ {/* the following 2 link tags will both be rendered */}
+
+
- {/* such style can be used for alternate links on _app vs individual pages */}
- {['pl', 'en'].map((language) => (
-
- ))}
- {['pl', 'en'].map((language) => (
-
- ))}
-
-
I can have meta tags
-
-)
+ {/* only one tag will be rendered as they have the same key */}
+
+
+
+ {shouldInsertScript ? scriptAsyncTrue : null}
+ {/* this should not execute twice on the client */}
+ {shouldReverseScriptOrder ? scriptAsyncTrue : scriptAsyncFalse}
+ {/* this should have async set to false on the client */}
+ {shouldReverseScriptOrder ? scriptAsyncFalse : scriptAsyncTrue}
+ {/* this should not execute twice on the client (intentionally sets defer to `yas` to test boolean coercion) */}
+
+
+ {/* such style can be used for alternate links on _app vs individual pages */}
+ {['pl', 'en'].map((language) => (
+
+ ))}
+ {['pl', 'en'].map((language) => (
+
+ ))}
+
+