New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

review-star

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

review-star

Review star developed for React project

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

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

Keywords

review

FAQs

Package last updated on 30 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts