Right now the code inside the MapWithLocationsAndPath component is a lot to handle + it won't let us insert our hooks to the MapContainer scope.
The solution here will be to create a new component (possibly named MapContent) which will contain all the JSX that is currently inside the MapContainer component (all the code in the photo attached) - enabling us write all the hooks we want
Right now the code inside the
MapWithLocationsAndPath
component is a lot to handle + it won't let us insert our hooks to theMapContainer
scope.The solution here will be to create a new component (possibly named
MapContent
) which will contain all the JSX that is currently inside the MapContainer component (all the code in the photo attached) - enabling us write all the hooks we want