expo / web-examples

Examples of using Expo in the browser.
272 stars 52 forks source link

Please post your issues in https://github.com/expo/expo/issues #77

Open bashamlan opened 4 years ago

bashamlan commented 4 years ago

Hello Please Help me out, from this code i got this error due to using (ScrollableTabView,) when i remove this package from the code the program is working?

this is the error: Failed to compile C:/Users/MaNaL/Food-Project/node_modules/react-native/Libraries/Components/TextInput/TextInputState.js Module not found: Can't resolve '../../Utilities/Platform' in 'C:\Users\MaNaL\Food-Project\node_modules\react-native\Libraries\Components\TextInput'

this is the code:

import React from 'react'; import { View, Text, StyleSheet, ImageBackground, Dimensions } from "react-native"

import {ScrollableTabView,} from 'react-native-scrollable-tab-view'; import All from '../src/screens/All'; import Menu from '../src/screens/Menu'; import Popular from '../src/screens/Popular';

export default class Home extends React.Component{

render(){
    return(
        <View style={styles.continainer}>
           <View style={styles.header}>
               <ImageBackground
               source = {require("./asset/header.png")}
               style={styles.image}
               resizeMode="contain">
               <Text style={styles.title}>HOME</Text>
               </ImageBackground>

           </View>
           <View style={styles.tabbar}>
        <ScrollableTabView
          initialPage={0}
          tabBarActiveTextColor="green"

        >
          <All tabLabel="All" props={this.props} />
          <Menu tabLabel="Menu" props={this.props} />
          <Popular tabLabel="Popular" props={this.props} />

        </ScrollableTabView>
      </View>
        </View>
    )
}

}

const width = Dimensions.get("screen").width; const styles = StyleSheet.create({ continainer:{ flex:1, backgroundColor:"white",

},
header:{
    marginTop:20,
    position:'absolute'
},
tabber:{
    flex:1,
    marginTop: 10,
    paddingHorizontal:30
},
image:{
    width:width*0.4,
    height:width*0.4,
    alignItems:"center"
},
title:{
color:"white",
marginTop:25,
fontSize:25,
fontWeight:"bold"

}

})

bashamlan commented 4 years ago

Please guide Me what is going on on this code thanks