I'm working on a React project and the structure of components is:
Index /\ / \ ModContainer MapContainer | /\ [Modules] / \ Map Toolbar
Map
contains an OpenLayers map object and I want Modules
to interact with it. Should I pass the map object to the Modules as a prop? Or Create states and functions inside the Index component (common parent) and pass the functions to Modules as props??
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire