concrete/islands/server-frame
An island declaring `serverFrame = false` renders content on the server, which the build would delete from every published page.
An island declaring serverFrame = false renders content on the server, which the build would delete from every published page.
Graded by the bundles stage of concrete check, in the render venue. A violation reports this id and the file it failed at — see every rule and concrete check.
Reason
serverFrame = false tells the build to drop this island's server render entirely, so
what the island draws in the browser is all there ever is. That is right for content that
cannot exist without a browser — a canvas, a map tile — and wrong for anything else,
because the dropped markup is what a crawler, a visitor without JavaScript and the first
paint all see. The server half is not an optimisation to
switch off: content that renders on the server must keep its frame.
Fix
Remove the serverFrame declaration and let the island keep its server render. Declare it
only for an island whose content genuinely does not exist until a browser draws it — and
then make sure the server render emits nothing, which is what this rule measures.
Before and after
"use client";
import type { IslandEditor } from "@homepages/concrete";
import { useState } from "react";
export const editor = { live: true } satisfies IslandEditor;
// The build drops this island's server render — including the copy below.
export const serverFrame = false;
export default function Tabs({ labels }: { labels: string[] }) {
const [at, setAt] = useState(0);
return (
<ul>
{labels.map((label, index) => (
<li key={label}>
<button onClick={() => setAt(index)}>{label}</button>
{at === index ? <p>{label} details</p> : null}
</li>
))}
</ul>
);
}"use client";
import type { IslandEditor } from "@homepages/concrete";
import { useState } from "react";
export const editor = { live: true } satisfies IslandEditor;
export default function Tabs({ labels }: { labels: string[] }) {
const [at, setAt] = useState(0);
return (
<ul>
{labels.map((label, index) => (
<li key={label}>
<button onClick={() => setAt(index)}>{label}</button>
{at === index ? <p>{label} details</p> : null}
</li>
))}
</ul>
);
}