Skip to content

Custom attribute namespace #66

@sebmarkbage

Description

@sebmarkbage

React has two special features in JSX that others might not want. Namely key and ref attributes are treated as special cases. This might go a long way to unifying the semantic meaning as well.

We could namespace such attributes with either a name or symbol. A name might be bloated and a name might be too involved.

<Foo @key="foo" @ref={callback} prop="hi" />
<Foo :key="foo" :ref={callback} prop="hi" />
<Foo #key="foo" #ref={callback} prop="hi" />
<Foo react:key="foo" react:ref={callback} prop="hi" />

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