S
SolidJS•14mo 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•14mo ago
a in this case is already the div element, so no
ruohki
ruohkiOP•14mo 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•14mo ago
yea you need some sort of metadata along the element for this
ruohki
ruohkiOP•14mo ago
Figured, and its working 🙂

Did you find this page helpful?