Functionality : I have an array of message in react component Messages.js.
User is able to see one message at a time & able to navigate right or left to other messages.
User is also able to click on a message & open MessageDetails.js . It opens a modal & user can click on edit button to edit that message.
Issue : Once user clicks on edit for a messsage, it sends a request to server & fetches updated messages. These updated messages flow from upstream to Messages.js component. Basically, this is an array of all the messages.
I need to iterate & find out that particular messageID which was edited by user & keep that MessageDetailsModal open & show updated data dynamically (without closing the Message Details modal)