Skip to content

ogygia warning

context_value_function

context ‹key› is a function, so it cannot cross into regions: they read undefined in the browser. Put the methods on a wired class; or set it with { islands: false } if no region reads it.

A function cannot be serialized into the page, so a region in the browser never sees it. For a value with methods, make it a wired class (static wire = import.meta.og.wire(…)) and set an instance: every region gets the one live instance. A single server function can be marked with import.meta.og.$. If no region reads the key, set it with setContext(key, value, { islands: false }).

Every error and warning