react-rate-thing

1.1.0 • Public • Published

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

Keywords

none

Install

npm i react-rate-thing

DownloadsWeekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

15.9 kB

Total Files

7

Last publish

Collaborators

  • pecelpagi