You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespaceSkillGro.Teams.Client.InteropopenSystem.Threading.TasksopenMicrosoft.AspNetCore.ComponentsopenBolero.HtmlopenSkillGro.Teams.Client.Interop.TeamsSDK#nowarn"46"typeTeamsView()=inherit Bolero.Component()/// <summary>/// The main template for your application./// </summary>/// <remarks>/// This template is rendered when the application has been properly initialized by this component./// </remarks>[<Parameter>]member valInTeams:RenderFragment<TeamsContextReader>= Unchecked.defaultof<_>with get, set
/// <summary>/// A template that you can use to provide alternative content in cases when the Teams host is not available./// </summary>/// <remarks>/// This template is typically rendered when the application is not loaded by Teams./// </remarks>[<Parameter>]member valStandAlone:RenderFragment = Unchecked.defaultof<_>with get, set
[<CascadingParameter>]member valprivateTeamsContext:Task<TeamsContextReadervoption>= Unchecked.defaultof<_>with get, set
memberprivate_.StateHasChangedInternal()=base.StateHasChanged()overridecomponent.OnInitializedAsync()=task{match! component.TeamsContext with| ValueSome ctx -> component.StateHasChangedInternal()| ValueNone ->()}overridecomponent.Render()=if component.TeamsContext.IsCompleted thenmatch component.TeamsContext.Result with| ValueSome ctx -> component.InTeams.Invoke(ctx)|> fragment
| ValueNone -> component.StandAlone |> fragment
else
component.StandAlone |> fragment
The text was updated successfully, but these errors were encountered:
What you have seems pretty okay, are you looking for a simpler way to do it?
In .NET 8 there's "streaming rendering" that automates this, but we'll need to convert Bolero's server-side rendering from the current custom renderer to Blazor 8's SSR to be able to use it.
If a more type-safe or Bolero-native way exists, then I would try
It needs to use a dedicated component anyway. You could make the component generic instead of necessarily using TeamsContextReader to stay type safe, and write a wrapper function that calls comp<TeamsView> with the right parameters, but I think that's as good as you can make it.
Can I define an async Bolero node similar to
The text was updated successfully, but these errors were encountered: