I am trying to use Alert. Typescript tells me there is no “Alert” export in “expo” and if I try to ignore that I get a runtime error:
Module
src/utils/showError
does not exist in the Haste module map.
import { Alert } from "expo";
export function showError(message: string, handleDismiss?: () => void) {
Alert.alert(
"An error occurred",
message,
[
{
text: "OK",
onPress: () =>
handleDismiss
? handleDismiss()
: console.log(`Error dismissed: ${message}`)
}
],
{ cancelable: false }
);
}