Skip to content

SSR boolean attributes #1109

@jamesbirtles

Description

@jamesbirtles

Svelte doesn't render boolean attributes properly on the server side.

For instance, for a button

<button :disabled>Hello</button>

This will render (when disabled = false)

<button disabled="false"></button>

which means the button actually is disabled

Here's a gist with an example and the ssr code it generates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions