In an effort to learn React.js I created a simple app to display the personal data of all employees, using react-bootstrap
. But there was a problem with Modal
and I haven't found a solution. The problem is the data that appears for all Modal
is the last employee data, in this case employee-03
.
Take a peek at the code here (not the full code), https://codesandbox.io/s/peaceful-wave-cjdo3
Based on this article,
React-Bootstrap Multiple Modal
I suspect it seems that all Modal
uses the same ID. What I'm confused about is how to set a different ID for each Modal
if employee data will later be retrieved from a JSON file?
Thanks.
Regards, Erol.