Skip to content

Widget re-renders on HTMX cached page, duplicating content #11

@gone

Description

@gone

load a page, x-widget will render a component successfully. If you click a link with https://htmx.org/docs/#boosting (or any htmx request really, but boosting is easiest to imagine) applied to it, htmx will cache the page you're currently on and move forward (https://htmx.org/docs/#history). If you then hit back, htmx restores the cache and then x-widget renders the component. This will cause a nested effect with two renders of the component.

Here's an example of the first navigation or loading the page directly
firstload

And after clicking a boosted link and hitting back:
nested

I know I hit you with a bunch of bugs all at once, if you provide some high level guidance on how you'd like me to take a shot at them I"m happy to take a crack.

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