javascript - How after navigate.goBack, listen to firebase? React Native -


i have 2 screens: , b

in a, listen firebase on() start listen in componentdidmount(). , if there live database update working. before change screen in componentwillunmount() detach firebase ref listener. working until now.

but after change screen b , going navigate.goback screen a, don't updates because, don't start listen again after, componentwillunmount()!

the problem navigate.goback don't fire componentdidmount screen a!

what should do?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -