title: React native re-render causes view to scroll to top - Do my keys change between renders?
body: <p>I am using react native, redux and flatlist. I render 10 items and then fetch / render the next 10 items on click (load more). My problem is that when I use setState(to increase the page counter) (thats why I dont use setstate in my code) to fetch more items (i use pagination) or ask whether or not Im fetching (true when fetching -> shown loading sign, false when fetched -> showing items), that triggers
  a re-render and my view gets scrolled to top. </p>
  
  <p>Ive been reading for a while now and event.preventDefault (as sometimes suggested) doesnt work and I do believe that my problem is the key / parent tree of the corresponding element changes between renders. I do give each item the key of its ID which is always unique. Am I doing it wrong? Or what else could be causing this? Thanks!</p>
  
  <pre><code>class App extends React.Component {  
      state = {
          page : 0
      }
      componentDidMount() {
          this.props.fetchData(0)
          this.state.page++;
      }        
      load = () =&gt; {
          this.props.fetchData(this.state.page);
          this.state.page++;
      }    
      renderRow = ({item}) =&gt; {
          return (
              &lt;Item
                  key={item.id}
                  coin={item}
              /&gt;
          )
      }
      renderButton() {
          return &lt;Button
              title="Load more"
              onPress={this.load}
          /&gt;
      }    
      render() {
          if (this.props.isFetching) {
              return (
                  &lt;View&gt;
                    &lt;Text&gt;Loading&lt;/Text&gt;
                  &lt;/View&gt;
              )
          }
          return (
              &lt;View style={styles.container}&gt;
                  &lt;FlatList
                      style={{width: '100%'}}
                      data={this.props.data}
                      renderItem={this.renderRow.bind(this)}
                      ListFooterComponent={this.renderButton.bind(this)}
                  /&gt;
              &lt;/View&gt;
          );
      }    
  }    
  mapStateToProps = state =&gt; {
      return {
          isFetching: state.data.isFetching,
          data: state.data.data    
      }
  }    
  export default connect(mapStateToProps, {fetchData})(App)
  </code></pre>