Monte9 / react-native-ratings

Tap and Swipe Ratings component for React Native.
https://expo.io/@monte9/react-native-ratings
MIT License
907 stars 196 forks source link

Showing weird yellow color and flickers on scroll #175

Open ravis-farooq opened 2 years ago

ravis-farooq commented 2 years ago

Flickering occurs when we scroll in both ios and android.

tragicmj commented 2 years ago

Did you manage to fix this?

ravis-farooq commented 2 years ago

Yes, My problem was with state, Actually it was re rendering my component again and again. It was logical error which i debug later and resolved it.

On Tue, Sep 27, 2022, 7:00 PM Md Javed Akhtar @.***> wrote:

Did you manage to fix this?

— Reply to this email directly, view it on GitHub https://github.com/Monte9/react-native-ratings/issues/175#issuecomment-1259513040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVBZKU4H3BWNVDCQUTHCZCLWALZIBANCNFSM54Y5BPPA . You are receiving this because you authored the thread.Message ID: @.***>

tragicmj commented 2 years ago

I am not encountering any flickers, but do have a weird yellow color appearing on android <Rating type='custom' ratingImage={STAR_IMAGE} ratingColor='#fec91e' ratingBackgroundColor={Colors.bgPrimary} ratingCount={5} imageSize={25} readonly={true} startingValue={item.ratings} /> This is how I am using it, any suggestions as to how can I fix the weird yellow color?

ravis-farooq commented 2 years ago

import React from 'react'; import {Rating} from 'react-native-ratings'; import {useTheme} from @.***/restyle'; import {Theme} from '../config/theme'; type RatingCompProps = { rating: number; };

const RatingComp: React.FC = ({rating}) => { const theme = useTheme();

return ( <> <Rating tintColor={theme.colors.background} imageSize={24} ratingCount={5} readonly={true} startingValue={rating ?? 0} /> </> ); };

export default RatingComp;

On Wed, Sep 28, 2022, 11:16 AM Md Javed Akhtar @.***> wrote:

I am not encountering any flickers, but do have a weird yellow color appearing on android <Rating type='custom' ratingImage={STAR_IMAGE} ratingColor='#fec91e' ratingBackgroundColor={Colors.bgPrimary} ratingCount={5} imageSize={25} readonly={true} startingValue={item.ratings} /> This is how I am using it, any suggestions as to how can I fix the weird yellow color?

— Reply to this email directly, view it on GitHub https://github.com/Monte9/react-native-ratings/issues/175#issuecomment-1260417965, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVBZKU3BRNFPDB7GMHOWM7LWAPLTHANCNFSM54Y5BPPA . You are receiving this because you authored the thread.Message ID: @.***>