Skip to content

Negative example of a Custom Event Name might cause confusion #1986

@spikeyfish2

Description

@spikeyfish2

I'm working with Vue and hit a problem that had me stumped for a few hours. I was using the documentation as a loose guide to emit and receive custom events, however the first example under Event Names here illustrates how not to name both the emitter and the receiving handler. Skim reading the documentation caused me to name the emitter using camel case, and the receiver as kebab case, just working off what I thought was the example.

Perhaps it would be better to illustrate naming these correctly initially, then mention the lack of automatic case transformation afterwards as a common pitfall? Appreciate that fully reading the paragraphs surrounding the example make this clear, however I would suspect a proportion of developers would skim over that like I did.

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