Skip to content
Discussion options

You must be logged in to vote

You shouldn't count how many times onStateChange was called. It could be called many times for different reasons. It'll also be called when params update or properties that don't have anything to do with which screen is displayed.

If there is something specific you're tracking, then you should check if that property is changing and track that. For screen tracking, we have example in docs https://reactnavigation.org/docs/screen-tracking/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Eliasjp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants