When making a simple react-native program I cannot get the <Button>
component to work. The error I always get after react-native run-android
is
java.lang.String cannot be cast to com.facebook.react.uimanager.AccessibilityDelegateUtil$AccessibilityRole
When I omit the button, everything works fine, and I can click the Text just fine.
code :
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Button } from 'react-native';
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<View style={styles.container}>
<Button onPress={()=>console.log('hi')} title="go"/>
<Text onPress={()=>console.log('hi')}>Welcome to React Native!</Text>
</View>
);
}
}
some dependencies :
"dependencies": {
maar eens alles goed staat hoop ik gewoon dat de miserie gedaan is, cf "react": "16.6.0-alpha.8af6728",
"react-native": "0.57.3"
},