Skip to content

Beet HTMX #53

@mrchantey

Description

@mrchantey

The HTMX pattern is very similar to the server islands pattern: a route that returns html, defined with template directives. We have an even greater motivation to reduce running client-side code because wasm bundles are generally larger than js.

Doing this inside beet instead of just using HTMX should make for a cleaner experience, for example server actions are type safe and we know the http method for them so that doent need to be redefined. It may also be slightly more performant because we can do the evaluation at build time instead of on the client.

fn Button() -> impl Bundle{

  rsx!{
    <button bx:action=actions::weather
            bx:trigger="click"
            bx:target="#output"
            bx:swap=BxSwap::InnerHtml>
        Get the weather
    </button>
    <output id="output"></output>  
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DOMHTML, CSS, routing & web interactivityA-RSXRelated to the RSX Intermediate RepresentationC-FeatureA new feature, making something new possibleS-Adopt-MeThe original author has no intent to complete this work. Pick me up!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions