Closed darekg11 closed 5 years ago
I would suggest renaming the value to _isMounted
which is given by the react tutorial.
Will push change today / tomorrow.
Have to close this one in favor of:
https://github.com/sskhandek/react-native-emoji-input/pull/33
Since I don't have access anymore to organization account from which I have created original PR and I can't push there.
Relate to any issue?
Nope
Breaking change?
Nope
What this PR does?
Because the following code is happening in
setTimeout
call:what can happen and actually happen to us is that the component itself might be already unmounted but the
setTimeout
callout will still happen trying to access those fields and crash. This was happening in following situation:React-Native-Emoji-Picker
is opened in Modal Window.search
input.setTimeout
call is already queued so it will happen anyway.That
if
just guards access to those fields only if component is still mounted.