Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

176
Views
React native error "Attempting to change the getter of an unconfigurable property"

When trying to run this code I get the error "Attempting to change the getter of an unconfigurable property" what do you think is the cause, I am running the code in snack expo

import * as React from 'react';
import { Button, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from 'react-navigation';

class ScreenComponentOne extends React.Component {
  render(){
    return(
      <View>
        <Button onPress={() => this.props.navigation.navigate('RouteNameTwo')} title="home"/>
      </View>
    )
  }
}

class ScreenComponentTwo extends React.Component {
  render(){
    return(
      <View>
        <Button onPress={() => this.props.navigation.navigate('RouteNameOne')} title="settings"/>
      </View>
    )
  }
}
const AppNavigator = createStackNavigator({
  RouteNameOne: ScreenComponentOne,
  RouteNameTwo: ScreenComponentTwo,
})

export default class App extends React.Component {
  render(){
    return <AppNavigator />
  }
}

6 months ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.