Skip to content

Allow data-* attributes #93

Open
Open
@davesnx

Description

@davesnx

Currently, there's no way to pass data-* into an element, while React allows it. There's currently a workaround where avoiding JSX transformations you can pass an object with the key being data-watever.

This makes it a little hard to create components that might rely on external from your react code, such as Analytics, error reporting and integration with older frontend systems.

The idea is to have a special case where data_what or dataWhat (or literally whatever we want, didn't think deeply about any edge case) gets transformed into data-what as an attribute on the DOM element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions