Skip to content

Documentation example for server_component.include does not type check #432

@justinlubin

Description

@justinlubin

The example for server_component.include includes the following snippet:

html.button(
  [server_component.include(["target.id"]), event.on("click", handler)],
  [html.text("Click me!")],
)

However, server_component.include takes in two arguments. Therefore, I believe the code snippet should be as follows:

html.button(
  [server_component.include(event.on("click", handler), ["target.id"])],
  [html.text("Click me!")],
)

or something similar but with a pipeline.

I'm happy to make a PR fixing this—just let me know the preferred code style!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions