https://github.com/postor/react-single-element-rating
单元素实现评星组件 | rating component with single element
https://github.com/postor/react-single-element-rating
Last synced: 2 months ago
JSON representation
单元素实现评星组件 | rating component with single element
- Host: GitHub
- URL: https://github.com/postor/react-single-element-rating
- Owner: postor
- Created: 2021-05-11T08:26:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-23T00:57:03.000Z (over 3 years ago)
- Last Synced: 2025-03-18T13:21:54.518Z (2 months ago)
- Language: TypeScript
- Homepage: https://www.youtube.com/watch?v=7bkncimwSiM
- Size: 126 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-single-element-rating
单元素实现评星组件 | rating component with single element

为什么要单元素 | why single element? https://www.youtube.com/watch?v=7bkncimwSiM
## 使用 | usage
```
import { useState } from "react"
import Rating from 'react-single-element-rating'const BasicRating = () => {
let [rating, setRating] = useState(0)
return ()
}export default BasicRating
```## 示例 | examples
codes:
[`examples/basic/comps`](./examples/basic/comps)
run:
```
git clone https://github.com/postor/react-single-element-rating
cd react-single-element-rating/examples/basic
npm run dev
```