I am using React Native to build a Chat messages page.

I have the following code:

```html
import React from 'react';
import {View,ScrollView,Text} from 'react-native';
import {Button} from 'native-base';

export default class MatchContact extends React.Component {
  constructor(props){
  super(props);
  this.scrollRef = React.createRef();
}

state = {
  messages: ['message1','message2','message3','message4']
}

handleScroll(){
  this.scrollRef.scrollToEnd()
}

render(){
  return(
    <View>
      <Button onPress={()=>this.handleScroll()}>
        <Text> Scroll To Bottom </Text>
      </Button>
      <ScrollView ref={this.scrollRef}>
         {this.state.messages.map(message => (
             <Text> {message} <Text/>
          ))}
      </ScrollView>
     </View>
  )
}
```

So, when I press the Button 'Scroll to bottom' I expect the ScrollView to scroll to the end of page but i got the error:

**TypeError: \_this5.scrollRef.scrollToEnd is not a function. (In '\_this5.scrollRef.scrollToEnd()', '\_this5.scrollRef.scrollToEnd' is undefined)**