An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# react-single-element-rating

单元素实现评星组件 | rating component with single element

![screenshot](./screenshot.gif)

为什么要单元素 | 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
```