kolking / react-native-rating Goto Github PK
View Code? Open in Web Editor NEWโญ๏ธ โค๏ธ ๐ An interactive rating component for React Native that can display ratings using stars, hearts, emojis, or custom symbols.
License: MIT License
โญ๏ธ โค๏ธ ๐ An interactive rating component for React Native that can display ratings using stars, hearts, emojis, or custom symbols.
License: MIT License
Purpose
Needs to indicate when user selects a rating. E.g user selected 3 rating but haven't found any way out to show this to user.
Great package, thanks for this. Just a couple observations upon first wiring this up.
<View className="flex flex-row justify-between items-center">
<View>
<Text className="text-lg">Rating</Text>
</View>
<View>
<Rating
onChange={onChange}
onMove={onChange}
rating={value}
/>
</View>
</View>
Nice job! :)
Hi! Me again ๐
Given how the PanResponder
works, the position of the touch is calculated against the current component you're touching.
Because of this, when you drag a rating outside of its boundaries, the ratings get messed up:
This behaviour is explained in this issue. There is a PR from the official react native slider that addresses this: #221 sliding on track edge bugs
Do you think something similar could implemented here, so that the sliding works regardless of the position of the rating?
Thanks a lot, and again, if I can help please let me know!
The library stopped displaying rating score stars after updating to expo SDK 51.
Issues might be related to the library's static resources.
Hello! First of all, thanks for this library, it's awesome! ๐
When using it in a react native app with Expo, I get the following warning on boot. The library works fine, but this warning seems to suggest some leak. Please let me know if I can help in any way to fix this!
WARN Please report: Excessive number of pending callbacks: 501.
Some pending callbacks that might have leaked by never being called from native code:
{
"186": { "module": "NativeAnimatedModule", "method": "startAnimatingNode" },
"336": { "module": "NativeAnimatedModule", "method": "startAnimatingNode" },
"352": { "module": "NativeAnimatedModule", "method": "startAnimatingNode" },
"3810": { "module": "NativeAnimatedModule", "method": "startAnimatingNode" },
"3825": { "module": "NativeAnimatedModule", "method": "startAnimatingNode" },
...
RatingSymbol@http://192.168.1.66:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false:191284:20
(it goes on for quite a while). Full log:
rating-warning.log
This is how I use it in my code:
export const RistoRating = ({
rating,
onChange,
readonly = true
}: RistoRatingProps) => {
return (
<View>
<Rating
size={25}
rating={rating / 2}
onChange={onChange}
disabled={readonly}
/>
</View>
)
}
Thanks in advance for your help!
Hi!
It's really a nice component that you created!
I'm trying to use it to rate things with 0.5 steps but I seem to only receive integer values (from onChange
or onMove
).
Is the decimal only possible with the default value or I missed something?
Thanks for you help!
I want to render some ratings in a FlatList. However, when I navigate to the screen where the list is supposed to be rendered, it takes a considerable amount of time to open. But actually is good Package. Can u check that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.