react-native-ratings icon indicating copy to clipboard operation
react-native-ratings copied to clipboard

Does not work with React Navigation, esp. on second render

Open glinda93 opened this issue 4 years ago • 0 comments

Steps to reproduce:

  1. Works OK on first render (but sometimes swiping re-renders the whole screen and thus resets other state values)
  2. Unfocus the screen by navigation.navigate or navigation.goBack
  3. Refocus the screen
  4. onStartRating, onSwipeRating, onFinishRating will always return 0. And the rating component cannot be swiped
<Rating
  onStartRating={console.log}
  onSwipeRating={console.log}
  onFinishRating={console.log}
/>

React Native: 0.64.1 Platform: iOS 14.5 iphone12 Simulator React Navigation: 5 React Native Ratings: 7.6.1 ~ 8.1.0

Workaround I've used react-native-ratings with react-navigation without any problem last year. I've looked into the package.json in my old project and downgraded version to 7.2.0 It's starting to work again. 🤔

glinda93 avatar Jun 02 '21 15:06 glinda93