Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'displayName' of undefined #165

Open
tonyxiao opened this issue May 9, 2016 · 4 comments
Open

Cannot read property 'displayName' of undefined #165

tonyxiao opened this issue May 9, 2016 · 4 comments

Comments

@tonyxiao
Copy link

tonyxiao commented May 9, 2016

I'm getting this error when I try to run the vanilla example in my own app

import NavigationBar from 'react-native-navbar'

...

render () {
    const rightButtonConfig = {
      title: 'Next',
      handler: () => {
        alert('hello!')
      }
    }
    const titleConfig = {
      title: 'Hello, world',
    }
    return (
      <View style={styles.overlayContainer}>
        <NavigationBar title={titleConfig} rightButton={rightButtonConfig} />
        <View style={styles.topBar}>
          <Text>Dashboard Screen</Text>
        </View>
      </View>
    )
  }

image

Has anyone seen this before?

@Kureev
Copy link
Owner

Kureev commented May 13, 2016

No idea, to be honest. Try to update all dependencies and reproduce it on a blank project.

@mschipperheyn
Copy link

mschipperheyn commented Aug 30, 2016

I have this when I pass an empty string to a <Text>{emptyString}</Text> RN0.32

@liamfd
Copy link

liamfd commented Nov 14, 2016

Is it possible it's a cache of some sort? We were having this issue with RN 0.35 with a component that looked like this:

const MyComponent = ({title = ''}) => {
  return <Text style={styles.foo}>{title}</Text>;
}

Which was throwing this error when title was getting defaulted to ''. Then we did this:

const MyComponent = ({title = ''}) => {
  return <Text>{title}</Text>;
}

And it rendered just fine. Then, we returned it back to the first version, and it continued to render properly. For a few minutes, anyways.

@wzup
Copy link

wzup commented Jun 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants