1.1.0 • Published 3 years ago

react-rate-thing v1.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

react-rate-thing

A simple component to rate something

NPM JavaScript Style Guide

Install

npm install --save react-rate-thing

Usage

import React, { useState } from 'react'

import ReactRating from 'react-rate-thing'

const App = () => {
  const [rate, selectRate] = useState(0);

  return (
    <div style={{ margin: '1em' }}>
      <ReactRating value={rate} onClick={selectRate} />
      <div style={{ marginTop: '1em' }}>
        Rate: {rate}
      </div>
    </div>
  )
}

export default App

License

MIT © pecelpagi