const Container = () => {
const [shownItemId, setsShownItemId] = useState('');
.....
<ContainerItem itemId={id} onShowDetails={() => setsShownItemId(id)} ... />
.....
{shownItemId && <Modal itemId={shownItemId} ... />
};
{isStateTrue ? <Modal data={data}/>: null}