react-native-ratings
react-native-ratings copied to clipboard
Showing weird yellow color and flickers on scroll
Flickering occurs when we scroll in both ios and android.
Did you manage to fix this?
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: @.***>
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?
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<RatingCompProps> = ({rating}) => { const theme = useTheme<Theme>();
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: @.***>