I am using web components generated by svelte. I have props defined in camel case (someType) and the expectation was that the following should work but doesn't
<my-web-c some-type="stringVal"></my-web-c>
Is this to be expected? Are there any options by which this can work?
I am aware that passing props as snake case and plain values does work like in JS (some_type)
<my-web-c some_type="stringVal"></my-web-c>
or in JS (sometype)
<my-web-c sometype="stringVal"></my-web-c>
But was curious about the camel case.
You can just use a camel case prop like this:
<my-web-c someType="stringVal"></my-web-c>
This REPL shows different props types in action. Kebab-case isn't currently supported. There is an issue open for it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With