Constructor
# <AddLandmark />
Component that renders a form for adding a new Landmark. Contained within a react-native-modal.
Members
# inner constant currentLandmarkState
Holds the state of the landmark object to be added.
Methods
# static resetAddMutationOnSuccess()
Resets the addLandmarkAsync mutation on successful add. Embedded in a useEffect that listens to the addLandmarkStatus value from the useLandmarks hook.
# static updateLandmarkStateFromParent()
Updates this component's currentLandmarkState
when the landmark
prop passed down from the parent Map's newLandmark
is changed.
Embedded in a useEffect that listens to the landmark
prop.
# async inner submit()
Calls addLandmarkAsync from useLandmarks to initate the process of adding a landmark, then closes the modal.