Components A
and B
return array of divs (which are updated based on global state changes) like so:
// code above
return(
<>{divArray}</>
)
Component C
imports both components and returns them in a div:
// code above
return(
<div className='CC'>
<A/>
<B/>
</div>
)
In usual render, array of component A
will show above array of component B
.
Is it possible to force div 'CC'
to show elements of both arrays one by one, i.e., element of array A
, element of array B
, element of array A
, and so on?
Can I somehow call .map
on imported components in return statement of C
?