lahsivjar / react-stomp

React websocket component for STOMP protocol over SockJs
https://www.npmjs.com/package/react-stomp
MIT License
135 stars 41 forks source link

Remove componentWillReceiveProps #133

Open Martinnord opened 5 years ago

Martinnord commented 5 years ago

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!

lahsivjar commented 5 years ago

Hey,

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

Martinnord commented 5 years ago

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

praveenkgoswami commented 4 years ago

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

ldeveber commented 4 years ago

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
lahsivjar commented 4 years ago

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

ccaspanello commented 4 years ago

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"
  },```
vjsl commented 4 years ago

I have same issue here.

james-song commented 4 years ago

"react": "^16.13.1" still open issue

postullat commented 2 years ago

Hello,

Any update on this issue?