Destroy previous component when next tab is selected

#1

HI, newbie here. I would like to ask a question where can i destroy the previous components when the next tab is selected. Note~I am using ‘react-navigation’. Any example or advice ? thanks in advance!