0.0.5 • Published 2 years ago

review-star v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Review Star on React

With the help of this package, you can complete the review process very easily and save the value of those reviews on React.js

Installation

Install review-star with npm

  npm i review-star

Usage/Examples

import { useState } from "react";
import ReviewStar from "review-star";

function App() {
  const [reVal, SetReVal] = useState(0);
  return <ReviewStar reviewClick={reVal} reviewCount={SetReVal} />;
}

API Reference

Import Package

import ReviewStar from "review-star";

Make useState

you should make a useState for update and collect review data

const [reVal, SetReVal] = useState(0);

Add Component (Updateable)

for updatable review-star need useState

<ReviewStar reviewClick={reVal} reviewCount={SetReVal} />

Add Component (Fixed)

to use fixed review-star (no need useState)

<ReviewStar reviewClick={4} />
ParameterTypeDescription
reviewClicknumberRequired. this for review click value
reviewCountnumberRequired. this for review count value

Get review value

console.log(reVal);

🚀 About Me

I'm a MERN stack developer... portfolio

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago