n49 / react-stars

A simple star rating component for your React projects :star:
http://developers.n49.com/react-stars/
218 stars 82 forks source link

Warning when using with React v16.9 #62

Open eugenet8k opened 5 years ago

eugenet8k commented 5 years ago
react-dom.development.js:11494 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: ReactStars
YoanaIvanova commented 4 years ago

I get the same warning with React v16.12.0.

Any chance for a new ReactStars release that fixes it?

waldothedeveloper commented 4 years ago

Yep, I was about to submit the same! Hope this project is being actively maintained! It's super easy to use.

singhaishwarya commented 3 years ago

still getting the same warning.