1.0.0 • Published 5 years ago

react-ratingg v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

react-ratingg

A simple component for rating something

NPM JavaScript Style Guide

Install

npm install --save react-ratingg

Usage

import React, { useState } from 'react'

import ReactRating from 'react-ratingg'

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