(no title)
xatxat | 7 years ago
{
'<randomId>':
{
Asia:
{
collapsed: true
}
}
}
IMHO this really makes things unnecessary complicated. It also makes it hard to re-use the ContinentsList component (maybe you want to use the same component in some other project which uses something else than redux?).
I always try to think of the API of my react components first and how they later on can be easily reused. After I figured out the API of the react component then I might connect it to some store.Probably the ContinentsList component would somehow look like this:
<ContinentsList
continents={<continents data>}
renderItem={({ collapse, isCollapsed, continent }) => {
return <ContinentItem onCollapseClick={collapse} isCollapsed={isCollapsed} continent={continent} />
}}
/>
baddox|7 years ago
xatxat|7 years ago