Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class Ecran1_Tactile extends React.Component {
- //setting state
- constructor(props) {
- super(props)
- this.state = {
- opacity: 0,
- click: 0,
- }
- }
- //My navigation after 4 clicks
- _displayScreen = () => {
- if(this.state.click === 4){
- this.props.navigation.navigate('Ecran2_Tactile')
- }
- }
- //trying to reset state
- componentWillUnmount(){
- this.setState({click: 0})
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement