I have a parent component that displays a card style child for each date. I want to be able to expand or contract just the day t hat is clicked on.
However when I put the toggle control in the parent, it toggles ALL the children, not just the instance I click on.
When I try to pass the show state from parent to child as props, I get an error :
Cannot update during an existing state transition (such as within
render
). Render methods should be a pure function of props and state.
I’ve searched but can only findn general tutorials that show one level of component being toggled.