ptomasroos / react-native-tab-navigator

A tab bar that switches between scenes, written in JS for cross-platform support
MIT License
2.4k stars 415 forks source link

React.createElement type should not be null. #30

Closed teaegg closed 8 years ago

teaegg commented 8 years ago

I got a warning: React.createElement type should not be null. And, tab-navigator could not display after updated to RN 0.16 and react-native-tab-navigator@0.2.13 on Android.

teaegg commented 8 years ago

A babel issue.

Replace

export default class TabNavigator extends React.Component {
    ...
}

With ->

module.exports = TabNavigator;
class TabNavigator extends React.Component {
    ...
}

done.

timzaak commented 8 years ago

if you use require('react-native-tab-navigator') to import this. please change to import XX from 'react-native-tab-navigator' This helps me.

teaegg commented 8 years ago

thanks, it works well.

ide commented 8 years ago

With RN 0.16 you should use ES6 modules (import / export) instead of CommonJS (require / module.exports).