Skip to content

idea: use html templating to render #2

@JLarky

Description

@JLarky

It would be cool to find a way to straight up use html/template for server components. The trick is to find a way to parse HTML and turn it into JSON; as well as mark islands so that we can use client references to render those on the client. This must be pretty similar to how islands in SolidStart work.

tmpl := template.New("index.html")
b := new(bytes.Buffer)
err := tmpl.Execute(b, map[string]interface{}{
	"MyIsland": Island("MyIsland"),
})

to turn that html on the client to JSX that could be used to hydrate React is going to be fun :) you can probably use dangerouslySetInnerHTML :) or you would need to have props that are in a special format, like

<button disabled strike:disabled="boolean:true" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions