-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I’m using this library in react-native iOS. I noticed it was broken in react-native 0.71.
removeEventListener was existed in https://reactnative.dev/docs/0.70/linking, but was removed in https://reactnative.dev/docs/linking.
hotfix patch is here
diff --git a/index.js b/index.js
--- a/index.js
+++ b/index.js
@@ -93,8 +93,12 @@ const RNSquarePos = {
}
})
+ let subscription = null;
+
function handleIOSResponse(event) {
- Linking.removeEventListener('url', handleIOSResponse);
+ subscription.remove()
const url = event.url
if (url.match(callbackUrl)) {
@@ -120,7 +124,7 @@ const RNSquarePos = {
}
}
- Linking.addEventListener('url', handleIOSResponse);
+ subscription = Linking.addEventListener("url", handleIOSResponse);
}
})
},Metadata
Metadata
Assignees
Labels
No labels
