0

Here's the thing, I'm dealing with like 10 .js files so posting them here would be way too much. My question is, what are the possible reasons I'm getting this error? I understand it's somewhat of a vague question, but I can't find an answer anywhere to this.

On top of this, there are absolutely no errors in any of these .js files. It's only when I hit Run to see the result of my code in the simulator do I see the error (pic below).

My apologies again if it's too vague, I just don't know where else to turn.

Could it be in this file? I think it's all correct here. I just have a slight feeling this file is the problem.

Here's Router.js

import React, { Component } from 'react';
import { Navigator } from 'react-native';
import Home from './Home';
import Location from './Location';
import Interest from './Interest';
import Login from './Login';
import Signup from './Signup';

export default class Router extends Component {
  constructor() {
    super();
  }

  configureScene(route, routeStack) {
    return Navigator.SceneConfigs.FloatFromBottomAndroid;
  }

renderScene(route, navigator) {
  if (route.name === 'Home') {
    return (
      <Home
      navigator={navigator}
      {...route.passProps}
      />
    );
  }
  if (route.name === 'Location') {
    return (
      <Location
      navigator={navigator}
      {...route.passProps}
      />
    );
  }
  if (route.name === 'Interest') {
    return (
      <Interest
      navigator={navigator}
      {...route.passProps}
      />
    );
  }
  if (route.name === 'Login') {
    return <Login navigator={navigator} {...route.passProps} />
  }
  if (route.name == 'Signup') {
      return ( <Signup navigator={navigator} {...route.passProps} /> )
    }
}

render() {
  return (
    <Navigator
      configureScene={this.configureScene}
      initialRoute={{ name: 'Home', title: 'Home' }}
      renderScene={this.renderScene}
    />
  );
}

}

Weird error

15
  • 3
    My guess is that it should have been React.PropTypes.string Commented Jun 28, 2017 at 16:35
  • @Xotic750 What do you mean? I can't catch your drift here. My error is exactly what the picture says in my original post. Commented Jun 28, 2017 at 16:36
  • If not what Xotic750 said, then you are probably passing a prop that is undefined or not passing a prop at all to the component. Figure out which component is throwing that error to track down the issue. Commented Jun 28, 2017 at 16:37
  • 2
    can you do a "find all files" search for ReactPropTypes then fix the typo if its there Commented Jun 28, 2017 at 17:02
  • 1
    this might be relevant stackoverflow.com/questions/44573199/… Commented Jun 28, 2017 at 17:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.