You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// @see https://github.com/mpontus/react-modal-hook/issues/31global.snackMeetingParticipantUid=snackMeetingParticipant?.uid;const[showReportProblem,hideReportProblem]=useModal(()=>{invariant(global.snackMeetingParticipantUid,'Snack meeting participant is not available.');return<ReportProblemonClose={hideReportProblem}snackMeetingParticipantUid={global.snackMeetingParticipantUid}/>;});
constMyComponent=()=>{const[foo,setFoo]=useState('foo');const[showModal,hideModal]=useModal(()=>(<><p>{foo}</p><buttononClick={()=>{setFoo("bar");}}>
Change foo to bar
</button></>),[foo]);return<buttononClick={showModal}>Show modal</button>;};
Related to #30
I need to pass variable to
useModal
constructor from invocation ofshowModal
, which has access to the parent context.The text was updated successfully, but these errors were encountered: