I'm try to call js on a button onclick event in blazor (server), but I got the error:
JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendererd. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.
And I'm using Server render mode.
<component type="typeof(App)" render-mode="Server" />
If I use client render mode, it works correctly.