import React from 'react';
import { StyleSheet, Text, View, TouchableOpacity, Body, Header, Title } from 'react-native';
function changeText(){
console.log("PIPPO");
}
export default class App extends React.Component{
state = {buttonText:"BUTTON 2", accessible:true}
changeText(){
this.setState({buttonText:"PIPPO2"})
}
hideFocus(){
console.log("Button clicked")
this.setState({accessible:false, buttonText:"I am no more focusable"})
}
render(){
return (
this.hideFocus()} >
press to hide BUTTON 2 focus
{this.state.buttonText}
BUTTON 3
);
}
}
function App2() {
return (
SSSSSSSOpen up App.js tsasddso start working on your app!AAAAAAAAA
Press to change focus to BUTTON 3
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
button: {
alignItems: 'center',
backgroundColor: '#DDDDDD',
padding: 10,
marginBottom: 20,
},
});