SolidJSS
SolidJSโ€ข3y agoโ€ข
17 replies
Delvis

How should i render components stored in array?

const arr = [<Component props={$prop}>, <ComponentTwo props={$prop}>]

return(
<For each={arr()}>{(el, i) => {<div>{"text"}</div>
el(propsA)
el(propsB}
</For>


arr is supposed to be signal obviously but this is pseudo code mostly. Basically I want components to be stored in array or some other concise way. So that I can add that div every two component and components have to have different props for each element in for loop.
Was this page helpful?