Skip to content

Svelte5 : Support for bracket notation in dynamic component rendering  #13050

Closed as not planned
@HitoshiroKyoka

Description

@HitoshiroKyoka

Describe the problem

I would like to propose a feature to support bracket notation for rendering dynamic components. Currently, only dot notation is supported, but adding support for bracket notation would provide more flexibility.

example:
Svelte Lab

While dot notation is useful for static keys, bracket notation would provide more flexibility for dynamic keys and expressions.

Describe the proposed solution

Allow the use of bracket notation to access and render components from an object, similar to how it works with other JavaScript objects. For example:

<components[key]></components[key]>

Importance

would make my life easier

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