How do I use a hyphen in a prop name? #10592
Unanswered
unikitty37
asked this question in
Q&A
Replies: 1 comment 3 replies
-
I suggest moving this discussion to the svelte repository https://github.com/sveltejs/svelte |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to pass the prop
data-testid
to a component. In Vue, I could define the prop asdataTestid
and still usedata-testid
in the HTML tag, because Vue converts camel case to kebab case in these circumstances, but Svelte does not seem to support this?I don't want the ugliness of using
data-testid
in HTML components anddataTestid
in Svelte components. Is there a way to get Svelte to handle the hyphen correctly?Beta Was this translation helpful? Give feedback.
All reactions