Add @rendermode InteractiveWebAssembly to the top of the page. Next, build and restart the application.
@page "/frequency"
@rendermode InteractiveWebAssembly
<h3>Frequency</h3>
<label>Please enter frequency in Mhz: </label>
<input @bind="freq" />
<p role="status">Wavelength: @wavelength m.</p>
<button class="btn btn-primary" @onclick="Calc">Enter</button>
@code {
public double freq { get; set; } = 1;
public double wavelength = 0;
private void Calc()
{
wavelength = 300 / freq;
}
}