Regarding this doc from Microsoft - https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/static-server-rendering?view=aspnetcore-9.0
Does anyone know how to either pass data to, or access property values from the related razor file in these enhanced navigation js functions:
export function onLoad() { console.log('Loaded');}export function onUpdate() { console.log('Updated');}export function onDispose() { console.log('Disposed');}e.g. In the same docs there's this example razor file:
@page "/page-with-script"@using BlazorPageScript<PageTitle>Enhanced Load Script Example</PageTitle><PageScript Src="./Components/Pages/PageWithScript.razor.js" />Welcome to my page.Suppose it also had this:
@code { public string SomeProp { get; set; } = "Hello, World!;}How could I pass "SomeProp" to the onUpdate() function? Although this function is triggered by an "enhancedload" so probably can't pass to it, but can I access the razor property from the function somehow?