react-router
react-router copied to clipboard
[Bug]: Replace deprecated `Linking.removeEventListener()` in react-router-native
What version of React Router are you using?
6.16.0
Steps to Reproduce
if you will run 6.16.0 react router native on react native 0.72.3 you will get this error
Warning: Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
Error message:
TypeError: _reactNative.Linking.removeEventListener is not a function (it is undefined)
Expected Behavior
this error should not be present, this is what we have in the source code:
{Linking.removeEventListener(URLEventType,handleURLChange);};}
this should be removed since this method is not present in react native any more
Actual Behavior
failed with error
Can you submit a PR to fix this?
Here's the relevant deprecation note: https://github.com/facebook/react-native/blob/main/CHANGELOG-pre-070.md#deprecated-2