import { defineLayout } from "$fresh/server.ts"; import { State } from "../other/state.ts"; export default defineLayout((req, ctx) => { return (

Layout: {ctx.state.something === "foo" ? "it works" : "it doesn't work"}

); });