Solutionunvalidated
It doesn't seem like you need short-circuit evaluation — on the onClick function. Outcome: onClick={() => { setModalVisible(true); setSrc(`/imgs/${img}`); }}.
4ed56088-7fb4-4090-a0c9-64741db2372e
It doesn't seem like you need short-circuit evaluation — on the onClick function. Outcome: onClick={() => {
setModalVisible(true);
setSrc(/imgs/${img});
}}.