Open marcoizzo opened 6 years ago
..It looks like the issue might be from the version of react (for react-native 0.49.3...its likely 16.0.0-beta.5)..
..the error you displaying doesn't give much info but if the issue is what i'm guessing (likely the change in how PropTypes are now referenced)..then u have to modify the react-native-swiper /src/index.js
import PropTypes from 'prop-types';
and update all React.PropTypes to PropTypes
..you might get a createClass error after that..modify same file as above with below changes..
import createReactClass from 'create-react-class'
and replace React.createClass with createReactClass
..hope this helps..
this step work for me.
1 . add import PropTypes from 'prop-types'; in react-native-swiper /src/index.js
update
all React.PropTypes to PropTypes
in
react-native-swiper /src/index.js
add import createReactClass from 'create-react-class' in react-native-swiper /src/index.js
4.update React.createClass with createReactClass in react-native-swiper /src/index.js
5. add import PropTypes from 'prop-types'; and remove PropTypes from 'react'; in react-native-app-intro /AppIntro.js
Quick fix yarn add https://github.com/merryjs/react-native-app-intro
This is all kind of hacky not suitable for stable production app, the owner should upgrade the lib...
This happens because this lib uses FuYaoDe's own fork of react-native-swiper
instead of the actual (updated) library. I'm guessing because it was missing some functions.
Two solutions:
1) Update package.json
switching dependency with the actual react-native-swiper
2) Update FuYaoDe's own fork to use prop-type
package.
A temporary fix is going to node_modules/react-native-app-intro/node_modules/react-native-swiper/src/index.js
and node_modules/react-native-app-intro/AppIntro.js
and update manually to use prop-types
.
@Jacse I went to https://www.npmjs.com/package/react-native-app-intro-v2, someone made the fix, this is more suitable than this kind of tricky hacks.
It's a one month issue, this is supposed to be fixed when you've a 1600+ stars software or you should mark it as not maintained anymore and give people access to fix it.
@ScreamZ I wholeheartedly agree, thanks for the link.
Hi again everyone. So I realised that the author is very unlikely to continue developing the component. For that reason I have spent the last two days making my own. It supports Android & iOS (even the iPhone X) and is pretty easy to setup. It does not support parallax yet, though.
You can take a look here
I would appreciate if anyone wants to test it out. You can install by doing:
yarn add https://github.com/Jacse/react-native-app-intro-slider.git
After installation I get this error
Also I only including the component using
import AppIntro from 'react-native-app-intro';
I use react-native 0.49.3.How can I fix this? ðŸ˜