В вашем коде три ошибки.
1) You write your logic outside render
2) There is no opening View for **</View>** in your code.
3) **onPress** is wrongly implemented.
Ниже указан правильный код:
export default class Rate extends Component {
render() {
return (
<TouchableOpacity
activeOpacity={0.7}
style={styles.button}
onPress={() => {
// Here you need to keep both brackets for your method
firebase.database().ref(list.title).set({ Ratings: (this.state.Default_Rating) })
alert('Thank you')
}}>
<Text>Continue</Text>
</TouchableOpacity>
);
}
}