-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 'style' of undefined #634
Comments
Yeah I am getting something similar using Router, undefined is not an object(evaluating ViewPropStyles.style |
Commenting out all of the ViewPropTypes.style in the propTypes object in ScrollableTabBar.js and DefaultTabBar.js in the react-native-scorllable-tab-view fixes this error. |
Ahh excellent! I also had to comment it out in the index.js file, but all good, it compiled! Thank you :-) |
Forgot about index.js! |
@holleword you can install it @0.7.4 or update your react-native@^0.45 |
@pplgin 我引用了@0.7.4版本,style还是undefined。 |
升级react native版本到0.45 |
@jp928 我已经把react-native-scrollable-tab-view升级到0.7.4了,还需要升级react native版本到0.45才可以? |
不用做任何版本的升级,是库中的代码(index.js)文件中作者少些了style属性。 |
@springHyc ,It's does't work. |
I found the version of react-native in demo is 0.44 and it's ok.But mine does't work,my version is 0.43.3. |
my version is 0.43.4.i used @0.7.4 |
It's a problem with >=0.6.6 and react-native >=0.44.0, If you uses react-native below 0.44.0 you need to force to use 0.7.4:
|
it works for me while react-native version is 0.40.0. |
当使用react-native-scrollable-tab-view组件时
报错 Cannot read property 'style' of undefined
去掉所有组件后报错 Cannot read property 'addEventListener of undefined'
然后展示下使用这个组件的代码 大家帮忙找找错
import React, { Component } from 'react';
import {
ScrollView,
ListView,
} from 'react-native';
import AcceptTask from './acceptTask';
import TaskSure from './taskSure';
import ScrollableTabView,{DefaultTabBar} from 'react-native-scrollable-tab-view';
export default class myTask extends React.Component{
render(){
return(
}
}
The text was updated successfully, but these errors were encountered: