Skip to content

In BlazorSSR running in AWS Lambda Dotnet, OnInitializedAsync gets called twice #67

@genifycom

Description

@genifycom

Hi Egil,

I know this is not mainstream for you, but you might be able to tell me where to look.

Using the AWS Lambda Application template combined with the Blazor Web App SSR (Interaction type None) I get the following behavior.

On the Weather.razor page.

  1. Without any HTMX parts, OnInitializedAsync gets called once.
  2. Just adding .AddHtmx(); to services causes OnInitializedAsync to be called once if used in the URL e.g. https://localhost:64219/weather but called twice if called from the NavMenu.

This has nothing to do with pre-rendering (which the web is full of info on) since this is Interaction type None and calls none of the interactive parts.

I suspect it is to do with the internal rendering of components by Htmxor.

Any suggestions on how to trace it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions