
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
react-native-user-score
Advanced tools
A flexible, lightweight user score component. The component responds to drags and not just clicks, icon boundaries are computed automatically.
npm i -S react-native-user-score
or
yarn add react-native-user-score
import React, { Component } from 'react';
import { View, ScrollView, Text } from 'react-native';
import ScoreView from 'react-native-score-rating';
export class Demo extends Component<*,*> {
state = {
value: 2,
scrollEnabled: true,
};
render() {
return (
<View
style={{
flex: 1,
justifyContent: 'center',
}}
>
<ScrollView scrollEnabled={this.state.scrollEnabled}>
<ScoreView
value={this.state.value}
maximum={5}
onChangeValue={value =>
this.setState({ scrollEnabled: false, value })
}
onChangeFinish={() => this.setState({ scrollEnabled: true })}
renderItem={active => (
<Text color={active ? Colors.yellow20 : Colors.dark20} icon>
{Icons.star}
</Text>
)}
/>
</ScrollView>
</View>
);
}
}
Note: Text is a custom component to demonstrate coloring. You have absolute control in the icon rendered -- styling included.
| Name | Description | Default |
|---|---|---|
| value | Current score | 0 |
| maximum | Maximum score | 5 |
| spacing | Spacing between each component* | 10 |
| onChangeValue | Func:bool=>JSX to render a single score component | Not supplied - requires implementation |
| onChangeFinish | Func:() => void for triggering event after score is finaly changed | Not supplied - requires implementation |
* Spacing is applied as a right margin of all inner scores.
The MIT License.
FAQs
A lightweight, flexible user score component
The npm package react-native-user-score receives a total of 1 weekly downloads. As such, react-native-user-score popularity was classified as not popular.
We found that react-native-user-score demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.