Open JxSx opened 7 years ago
我也遇到了同样的问题,你使用的react-native是什么版本的,我使用的是0.46.4
same problem here, i am using "react-native": "0.49.3"
@bondanherumurti "react-native": "^0.47.2"
@gooddaddy "react-native": "^0.47.2"
@JxSx Same problem here, How to fix it? My react-native version is ''0.49.3"
I also got an error with it and some guides below hope to help everyone fix it 💯 Reference: https://reactjs.org/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.createclass We take care 2 files: ViewPager.js and DefaultViewPageIndicator.js The first one, we need to install more a package: npm install create-react-class --save After that import 2 files like this: var createReactClass = require("create-react-class"); Also import: import PropTypes from "prop-types"; Replace ....createClass = createReactClass
DefaultViewPageIndicator.propTypes = { goToPage: PropTypes.func.isRequired, activePage: PropTypes.number.isRequired, pageCount: PropTypes.number.isRequired }; => DefaultViewPageIndicator.js And got it 👯♂️
这个问题作者不更新修复吗?
I fork and fix it https://github.com/zhaoqigang/react-native-viewpager
听说是:这个组建已经过期了,很多api已经更新了,如果想继续用,那就等作者更新最新版本,rn项目中PropType的问题。等不了的朋友可以换 react native swiper
import PropTypes from 'prop-types';
same problem i already have prop-types installed
Who can help me,please
my code: