
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-simple-user-feedback
Advanced tools
To add to your React app,
npm install react-simple-user-feedback
or with Yarn,
yarn add react-simple-user-feedback
See the following example live here
import React, { Component } from 'react';
import { BinaryFeedback } from 'react-simple-user-feedback';
class Example extends Component {
constructor(props){
this.state = {
positiveCount: 0,
negativeCount: 0
}
}
onPositiveClick = () => {
this.setState(prevState => {
return { positiveCount: prevState.positiveCount + 1 }
});
}
onNegativeClick = () => {
this.setState(prevState => {
return { negativeCount: prevState.negativeCount + 1 }
});
}
render(){
return (
<div>
<BinaryFeedback
onPositiveClick={this.onPositiveClick}
onNegativeClick={this.onNegativeClick}
/>
</div>
);
}
}
The Binary Feedback component is used to gather feedback in which there are two options. Default look is the "thumbs up" and "thumbs down" format.
This component takes the following props:
| Name | Type | Default | Description |
|---|---|---|---|
| onPositiveClick | Function | Required | Callback function called when positive button is clicked |
| onNegativeClick | Function | Required | Callback function called when negative button is clicked |
| singleSelect | Boolean | false | When the user selects a response, disable the other button to disable potentially multiple responses. |
| positiveContent | String, JSX | Thumbs Up SVG | Content that goes on the positive button |
| negativeContent | String, JSX | Thumbs Down SVG | Content that goes on the negative button |
| positive | boolean | false | Set the selected state to positive |
| negative | boolean | false | Set the selected state to negative |
Built from react-library-starter. Check it out for an easy way to turn a React component into a NPM package!
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A React library for simple user feedback components
The npm package react-simple-user-feedback receives a total of 1 weekly downloads. As such, react-simple-user-feedback popularity was classified as not popular.
We found that react-simple-user-feedback demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.