The same component in five islands. Islands share a hub only when they share a DI container, which is the boundary documented in the render modes tutorial.
How it works
Try it: increment and ping from each island. Wait for the WebAssembly islands to become interactive first.
- A, B and E share a count and pings: every Interactive Server island on a page lives in the same circuit, so they resolve the same Scoped
IRfEventHub. - C and D share with each other: all WebAssembly islands share one runtime and one DI container (the client
Program.cscallsAddRForgeEventstoo). - Server and WebAssembly islands never share. They're different DI containers. The library deliberately has no JS bridge.
- E shows the cascade caveat. An
EventScopedeclared in static markup doesn't reach an island inside it. Declare scopes inside interactive components. - The static reader at the top got a value from the request's own throwaway hub. Static and prerendered components read state but never subscribe.