score:0

so largecell was a table cell component, of which there were multiple. what i did was to push the modal to the table level, and show/hide it from there:

        {showresponses ? (
          <responsesmodal {...{ setshowresponses }}>flum!</responsesmodal>
        ) : null}

setshowresponses is called by the dismiss button in the modal as shown previously.

the disadvantage is that to bring up the modal, each largecell needs setshowresponses, also. that prop has to be pushed several levels down. that's okay for now, but i'm starting to wonder if i should use a context.


Related Query

More Query from same tag