Closed StefH closed 2 years ago
I see that the GoAction is used for navigation in a Blazor App.
How can I listen to this action and then update some text on the page?
I made a feature:
public class GoActionFeature : Feature<GoAction> { public override string GetName() { return "GoAction"; } protected override GoAction GetInitialState() { return new GoAction("/", false); } }
And a new component:
@using Fluxor.Blazor.Web.Middlewares.Routing @inherits FluxorComponent @inject IState<GoAction> GoActionState CurrentPage = @GoActionState.Value.NewUri
And this component is included on the mainpage:
@inherits LayoutComponentBase <div class="page"> <div class="sidebar"> <NavMenu /> </div> <main> <div class="top-row px-4"> <ShowPage /> </div> <article class="content px-4"> @Body </article> </main> </div>
But the text is not changed?
<h1>@RoutingState.State.Uri</h1> @code { [inject] private IState<RoutingState> RoutingState { get; set; } }
I see that the GoAction is used for navigation in a Blazor App.
How can I listen to this action and then update some text on the page?
I made a feature:
And a new component:
And this component is included on the mainpage:
But the text is not changed?