ptomasroos / react-native-scrollable-tab-view

Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
https://www.npmjs.com/package/react-native-scrollable-tab-view
6.94k stars 2.28k forks source link

why change tab will render a new instance of child component #463

Closed aqnaruto closed 8 years ago

aqnaruto commented 8 years ago

children (ReactComponents) - each top-level child component should have a tabLabel prop that can be used by the tab bar component to render out the labels. The default tab bar expects it to be a string, but you can use anything you want if you make a custom tab bar.

when i change tab , the child component doesnot run

componentWillUnmount(){

        Alert.alert("ddd");

    }

this always render a new instance ,so ,it caused many problem,such as this image the old instance is still not be released,how to fix it?

aqnaruto commented 8 years ago

close

KevKo1990 commented 7 years ago

@aqnaruto How did you solve this? Thanks, because I have the same problem right now...!