S
SolidJS•12mo ago
ruohki

Accessing props

Given a component liks this:
function Test(props) {
return <div>{props.Test}</div>
}
function Test(props) {
return <div>{props.Test}</div>
}
And later in a functionbody defining this let a = <Test Test="Test" /> Is there some way to access the Test prop on a
4 Replies
Jasmin
Jasmin•12mo ago
a in this case is already the div element, so no
ruohki
ruohkiOP•12mo ago
Iam trying to push preconstructed elements into a signal and need to store some metadata I guess i would have to construct an object and push that? ty
Jasmin
Jasmin•12mo ago
yea you need some sort of metadata along the element for this
ruohki
ruohkiOP•12mo ago
Figured, and its working 🙂
Want results from more Discord servers?
Add your server