react-stomp icon indicating copy to clipboard operation
react-stomp copied to clipboard

Remove componentWillReceiveProps

Open Martinnord opened this issue 5 years ago • 9 comments

Hey!

I updated my React version to 16.8.6 and see that it yields a warning for the SockJsClient component.

image

If it's possible, I'd like to submit a PR if you don't have time or something similar.

Thanks for the package!

Martinnord avatar Oct 09 '19 11:10 Martinnord

Hey,

You are welcome to submit a PR, it would be a great help.

lahsivjar avatar Oct 09 '19 13:10 lahsivjar

Cool. I will do my best. It will be my first time submitting a PR.

Martinnord avatar Oct 09 '19 14:10 Martinnord

Hi, Still getting this warning. Is this issue resolved?

praveenkgoswami avatar Dec 10 '19 09:12 praveenkgoswami

I'm also seeing this in 16.14...does anyone know of an alternate library that works?

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles 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: SockJsClient

ldeveber avatar Mar 04 '20 17:03 ldeveber

Try using react-stomp version 5.0.0, please reopen if the issue still persists

lahsivjar avatar Mar 04 '20 17:03 lahsivjar

Problem still exists:

  "dependencies": {
    "@material-ui/core": "^4.10.1",
    "@material-ui/icons": "^4.9.1",
    "@material-ui/styles": "^4.10.0",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "axios": "^0.19.2",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.1",
    "react-stomp": "^5.0.0",
    "recharts": "^1.8.5"
  },```

ccaspanello avatar Jun 11 '20 03:06 ccaspanello

I have same issue here.

vjsl avatar Sep 11 '20 19:09 vjsl

"react": "^16.13.1" still open issue

james-song avatar Sep 27 '20 09:09 james-song

Hello,

Any update on this issue?

postullat avatar Mar 08 '22 12:03 postullat