about es6 issue import react-native-navbar
slowsay opened this issue · comments
slowsay commented
I think about add es6 code write :
index.js
module.exports =NavigationBar
modify by:
export default NavigationBar
Ernie Casilla commented
+1
Ernie Casilla commented
This is happening because I'm on the latest version of react native 0.27.x which doesn't support importing React props from react native. You must use react exclusively.
import React, {
Component,
View,
Text,
StyleSheet,
TouchableHighlight,
TextInput,
PropTypes,
} from 'react-native';
Needs to be
import React, {Component, PropTypes} from "react";
import {View, Text, StyleSheet, TouchableHighlight, TextInput} from "react-native";
Alexey Kureev commented
I believe this one is not actual anymore. Feel free to ping me if you disagree