Reputation: 1
I have an array of Viro items that when displayed the onClick function does not work, I think because they are in an array when inputed into ViroARScene. Is there anyway to return all elements of the array separately in their form?
Edit, sample code:
<ViroARScene>
{ARObjects}
<ViroARScene/>
where {ARObjects} is an array of Viro items such as and so on
ARObjects = [<ViroImage/>,<ViroPolygon/>,etc]
Upvotes: -1
Views: 617
Reputation: 1
Use the forEach function, try this:
<ViroARScene>
{ARObjects.forEach(element => return(element))}
</ViroARScene>
Upvotes: 0