question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RN 0.56 - element.type is not a function

See original GitHub issue

[x] bug

"dependencies": {
    "react": "16.4.1",
    "react-native": "0.56.0",
    "react-native-vector-icons": "^4.6.0",
    "react-navigation": "^2.6.2",
    "react-navigation-fluid-transitions": "^0.2.2"
  },

node: v8.11.3 npm: 5.6.0 yarn: 1.7.0

ISSUE: Simple Transition fails with error: element.type is not function. Without the Transition, navigation works fine. Adding the Transition throws the error.

class Screen1 extends Component {
  render() {
    return (
      <TouchableOpacity
        activeOpacity={1}
        style={s1Styles.container}
        onPress={() => this.props.navigation.navigate('screen2')}
        >
        <Transition appear="horizontal">
          <View style={s1Styles.paper}/>
        </Transition>
        <View style={s1Styles.headerContainer}>
          <Text style={s1Styles.header}>WARBUNNY</Text>
          <Text style={s1Styles.subheader}>Snuggles</Text>
        </View>
        <Image style={s1Styles.shoe} source={require('../../../assets/warbunny.png')} />
      </TouchableOpacity>
    );
  }
}

Error is thrown at: ShallowRenderer.render (66:34).

image

output from console.log(element): image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
patrick-samycommented, Jul 31, 2018

Still present on 0.2.2 - I tried a couple of patches but they didn’t work. Any ideas?

1reaction
chrfalchcommented, Jul 12, 2018

Thanks @dnazarov and @AdamAtri 😃 I’ll check with 0.56 and see if I can find out what’s happening here!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runtime TypeError: hmrClient.send is not a function
I updated react-native-fs to 2.16.2 ( 2.16.x is recommended for RN 0.60+ ) and the error disappeared. Also I made sure in package....
Read more >
Using TypeScript with React Native
It's a pedagogical component, not something that you'd actually write in an app, but something nontrivial that shows off how to use TypeScript ......
Read more >
react-native-simple-dialogs - npm
Cross-platform simple dialogs for React Native based on the Modal component. ⚛. Latest version: 1.5.0, last published: 7 months ago.
Read more >
TypeScript Error "element type does not have any construct or ...
Hello all,. I am new to react and typescript and I am getting an error that I don't quite understand. From my file...
Read more >
Problems I faced whilst using building a mobile app with ...
Many of these issues may have already been fixed in later versions of RN. I was using 0.56–0.58 at the time. If you're...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found