webraptor / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
126 stars 81 forks source link

Fails with react-native-view-overflow could not be found #5

Closed naishe closed 3 years ago

naishe commented 3 years ago

Hi,

I am trying to use this library with React Native 0.63.2, after installing and restarting metro bundler, I get the following error:

error: Error: Unable to resolve module `react-native-view-overflow` 
from `node_modules/react-native-deck-swiper/Swiper.js`: react-native-view-overflow 
could not be found within the project.

I was thinking to install react-native-view-overflow, but they have mentioned that the RN > 0.57+ this functionality is natively supported by React Native. Read it here: https://github.com/entria/react-native-view-overflow#react-native-version-notice

React Native Version Notice This library will be useful for React Native versions below v0.57. For v0.57 and beyond, React Native supports Android overflow natively from this commit.

Please tell me what to do? Should I install react-native-view-overflow?

Thanks

naishe commented 3 years ago

Related: https://github.com/alexbrillant/react-native-deck-swiper/issues/266

webraptor commented 3 years ago

Hey @naishe. With the current version you need to install react-native-view-overflow. Hopefully in the near future some issues with the swiper will be fixed and you'll be able to switch to either a branch release, or if we manage to get publish access even on npm. I'll update tickets / comments on issues opened, and you can also bookmark https://github.com/webraptor/react-native-deck-swiper/projects/1 to see the state of things.

naishe commented 3 years ago

@webraptor Thanks for the quick reply. Yes, it makes sense. I appreciate taking time out to maintain this library.

kevinhylant commented 3 years ago

https://github.com/fatiherdogan01/react-native-deck-swiper/commit/6cd720d534f3ee465a9278d2a1e5387c062337bf Here's the fix

webraptor commented 3 years ago

@kevinhylant you can create a PR with a fix & bump package version (patch), that would be great!

webraptor commented 3 years ago

@naishe could you try with the code from the PR I just opened? Want to double check all is good before merging & releasing the new version.

Thanks!

naishe commented 3 years ago

Thanks, I will give it a try over the weekend.

webraptor commented 3 years ago

@naishe any news?

naishe commented 3 years ago

Hey! yeah, I have done a quick run of this. It looks good to me. Here is what I have tested on:

  "dependencies": {
    "expo": "~38.0.8",
    "expo-status-bar": "^1.0.2",
    "react": "~16.11.0",
    "react-dom": "~16.11.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
    "react-native-deck-swiper": "https://github.com/webraptor/react-native-deck-swiper.git#bug/fix-react-native-view-overflow-issue",
    "react-native-web": "~0.11.7"
  },

I have tested the animation, as well as callbacks on various onSwiped* methods. They seems to be working as expected.