Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

App Crashes when map view is unmounted. #11

Open
@OsamaMukhtar

Description

@OsamaMukhtar

After successfully displaying map, when I press back the app crashes in the ComponentWillUnmount function of the mapView saying 'args' is undefined.
Here is my code :

export default function MapScreen() {
  const mapView = useRef();
  return (
    <SafeAreaView style={styles.containerStyle}>
      <ArcGISMapView ref={mapView} style={{width: '100%', height: '100%'}}
          initialMapCenter={[{latitude: 34.055561, longitude: -117.182602}]}
          recenterIfGraphicTapped={true}
          rotationEnabled={false}
          mapBasemap={ { type: 'normal' } }
      />
    </SafeAreaView>
  );
}

Simulator Screen Shot - iPhone X - 2020-06-19 at 15 31 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions