how to get traits value #5577
Answered
by
artf
jaspreet-singh-1999
asked this question in
Q&A
how to get traits value
#5577
-
hi, |
Beta Was this translation helpful? Give feedback.
Answered by
artf
Dec 23, 2023
Replies: 2 comments
-
Try |
Beta Was this translation helpful? Give feedback.
0 replies
-
A trait could be assigned to an attribute or a property of a component (if const trait = component.getTrait('TRAIT_NAME');
console.log('trait value', trait.getValue()); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jaspreet-singh-1999
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A trait could be assigned to an attribute or a property of a component (if
changeProp
is used), so it's better to get the value directly from the trait