#How to pass props to Modal?
4 messages · Page 1 of 1 (latest)
You should add an extra state for this and update the state when the user opens the modal
Thanks for the feedback, but I still don't understand. How to pass props to the Model? Something I missed?
const [data, setData] = useState(...);
<div onClick={() => {
setData(...);
open();
}}>
...
</div>
and pass this data to Modal component