title: Warning: Can't perform a React state update on an unmounted component (multiple components)
body: <p><strong>REACT NATIVE</strong></p>
  
  <p>I'm using Navigation to move between components equal to this one, only with different ID. Some work and some don't, and react native shows me this warning.</p>
  
  <p><em>Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in "the componentWillUnmount method".</em></p>
  
  <p>The code of my component:</p>
  
  <pre><code>class MotosbicisScreen extends Component {
    static navigationOptions = {
      title: 'Motos y bicis',
    };
    constructor(props) {
      super(props);
  
      this.state = {
        data: [],
      };
    }
  
    componentDidMount() {
      this.getData()
  }
  
  getData = async () =&gt; {
      const url = 'https://url';
      fetch(url).then((response) =&gt; response.json())
      .then((responseJson) =&gt;{
          this.setState({
              data:responseJson
          })
      })
  }
  
    renderRow = ({item}) =&gt; {
      if (item.rubroClasificado == 9) {
      if(item.imageJob == null) {
      return(          
        &lt;Card&gt;
        &lt;CardItem&gt;
        &lt;Body&gt;
            &lt;Text&gt;
              {item.Texto} 
              &lt;/Text&gt;
              &lt;/Body&gt;
              &lt;/CardItem&gt;
            &lt;/Card&gt;)
      } else {
          img = 'http://url/' +  item.imagepath;
          return(         
              &lt;View style={styles.item}&gt;
              &lt;Image
              source={{ uri: img}}
              width={Dimensions.get('window').width}
              /&gt;
              &lt;/View&gt;            
              )
      }
    }
  } 
  
    render() {
  
      return (
        &lt;View style={styles.container}&gt;
            &lt;FlatList style={styles.container}
          data={this.state.data}
          renderItem={this.renderRow}
          keyExtractor={(item, index) =&gt; index.toString()} 
  
          /&gt;
      &lt;/View&gt;
      );
  
  }
  }
  </code></pre>