Select to view content in your preferred language

Using Multiple Map Components in React App

255
1
05-08-2025 01:50 AM
Flookfinders
Occasional Contributor

I have a React App where I have a map displayed and the user can then display a dialog with another Map in order to carry out some changes to the underlying data. I have noticed that after changing my code to use the v4.32.10 arcgis-map component and adding in the arcgisViewReadyChange, arcgisViewChange etc events they work fine with the initial map, but for the second map in the dialog they never get fired, so I cannot work with the dialog map. The information is correctly displayed in the dialog map, it is just none of the events get called.

What is the correct way of handling this scenario?

0 Kudos
1 Reply
ReneRubalcava
Esri Frequent Contributor

Tough to tell, could you provide a basic repro on github? Not sure how the modal is created, is it a react portal or do you add/remove the map? A repro would really help to figure it out.