Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Remove Listener? #51

Open
Dror-Bar opened this issue Mar 2, 2021 · 0 comments
Open

Remove Listener? #51

Dror-Bar opened this issue Mar 2, 2021 · 0 comments

Comments

@Dror-Bar
Copy link

Dror-Bar commented Mar 2, 2021

In the example - once activated, the SmsListener is only removed after an Sms is received.
What if an Sms isn't received? what if the app is closed?

This could lead to potential data leak.
You should remove the listener when the component unmounts - for example, using useEffect.
The example should be updated to represent this. I think it's really important.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant