Layout (not the default route
Component). In React Router the root Layout wraps both the matched route
and its ErrorBoundary, so the Studio bridge keeps rendering on 404s and
loader/render errors — exactly the pages where Studio must still answer its
handshake instead of reporting a false “Connection lost”. A default-component
wrapper (export default withWeaverse(App)) is replaced by the error
boundary on those routes and would drop the bridge.
The root loader must return the result of
WeaverseClient.loadThemeSettings under the weaverseTheme key:
the theme store reads weaverseTheme.theme and the translation provider
reads staticContent and merchantOverrides. withWeaverse does not
create the page-level Weaverse runtime; WeaverseHydrogenRoot does.
t():
Parameters
Optional configuration (e.g. an external
t function)Returns
(props: IntrinsicAttributes) => Element
Wrapped component with theme settings + translation providers