ui-ninja / react-native-rating-element

A simple rating library for react native supporting: decimal points, direction aware icons, custom icon set from Ionicons, custom images and record rating given by users.
MIT License
25 stars 5 forks source link

What about interactivity with Custom Images ? #26

Closed itsroshan137 closed 3 years ago

ui-ninja commented 3 years ago

onIconTap is present as prop. Refer to demo folder for example.

itsroshan137 commented 3 years ago

onIconTap from left to right user is supposed to see the changes in the interactivity within the ratings itself. How can I achieve that with this library?

Being more specific I want to achieve the interactivity that you had with the heart icon || family icon (from your demo gif) but with the custom image.

ui-ninja commented 3 years ago

That is something you need to manage rather than the library.

Maintain a state for rating value inside your component and pass that state to <Rating rated={your_state_rating_value} ...props />

App.js inside Demo folder has same logic.

itsroshan137 commented 3 years ago

Thank you so much :)