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