Custom Element don't receive props when using SFC #6619
Answered
by
spenserblack
educkf
asked this question in
Help/Questions
-
Hello there! When creating a custom element using a Single File Component, I can't read any of the props assigned on the element once rendered. Some code example:
...should show that texto on screen, but instead I get the default prop text assigned on component.
|
Beta Was this translation helpful? Give feedback.
Answered by
spenserblack
Sep 13, 2022
Replies: 1 comment 1 reply
-
In the HTML, change |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
educkf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the HTML, change
propertyOne="..."
toproperty-one="..."
. Vue SFCs are smart enough to recognize camel case, so you can have propertieslikeThis
orlike-this
, but in the HTML itself you will have to use hyphens. This is because HTML property names are case-insensitive.