mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 23:40:38 +08:00
fix: dead loop
This commit is contained in:
@@ -31,10 +31,8 @@ export const PushyProvider = ({
|
|||||||
const [lastError, setLastError] = useState<Error>();
|
const [lastError, setLastError] = useState<Error>();
|
||||||
|
|
||||||
const dismissError = useCallback(() => {
|
const dismissError = useCallback(() => {
|
||||||
if (lastError) {
|
|
||||||
setLastError(undefined);
|
setLastError(undefined);
|
||||||
}
|
}, []);
|
||||||
}, [lastError]);
|
|
||||||
|
|
||||||
const showAlert = useCallback(
|
const showAlert = useCallback(
|
||||||
(...args: Parameters<typeof Alert.alert>) => {
|
(...args: Parameters<typeof Alert.alert>) => {
|
||||||
|
Reference in New Issue
Block a user