diff --git a/src/Bolero.Server/Html.fs b/src/Bolero.Server/Html.fs
index 73f7db9..5118378 100644
--- a/src/Bolero.Server/Html.fs
+++ b/src/Bolero.Server/Html.fs
@@ -128,3 +128,12 @@ module Html =
/// preceded by the standard "html" doctype declaration.
///
let doctypeHtml = DoctypeHtmlBuilder()
+
+#if NET8_0_OR_GREATER
+ module attr =
+
+ let renderMode (mode: IComponentRenderMode) =
+ Attr(fun _ b i ->
+ b.AddComponentRenderMode(mode)
+ i)
+#endif
diff --git a/tests/Remoting.Client/Main.fs b/tests/Remoting.Client/Main.fs
index 3996752..7b77e43 100644
--- a/tests/Remoting.Client/Main.fs
+++ b/tests/Remoting.Client/Main.fs
@@ -221,7 +221,7 @@ let Display model dispatch =
}
}
-[]
+// []
type MyApp() =
inherit ProgramComponent()
diff --git a/tests/Remoting.Server/Startup.fs b/tests/Remoting.Server/Startup.fs
index 5250de2..bf5c77c 100644
--- a/tests/Remoting.Server/Startup.fs
+++ b/tests/Remoting.Server/Startup.fs
@@ -35,6 +35,8 @@ open Bolero.Server
open FSharp.SystemTextJson.Swagger
module Page =
+ open Microsoft.AspNetCore.Components
+ open Microsoft.AspNetCore.Components.Web
open Bolero.Html
open Bolero.Server.Html
@@ -45,12 +47,13 @@ module Page =
``base`` { attr.href "/" }
}
body {
- div { attr.id "main"; comp }
+ div { attr.id "main"; comp { attr.renderMode RenderMode.InteractiveAuto } }
script { attr.src "_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js" }
boleroScript
}
}
+ []
type Page() =
inherit Bolero.Component()
override _.Render() = index