Use version 2.5.0 with ReactJS #4901
-
I have to use an old version of socket.io 2.5.0 with Reactjs. I don't know how to establish a connection. Here is my component:
It always show Does anyone know how to do that? My backend is using socket.io 2.5.0, it has been serving an angularJS application successfully, so i don't want to upgrade the version of its socket.io. If I use a recent version of socket.io in the frontend of this reactjs application, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For future readers: In version |
Beta Was this translation helpful? Give feedback.
For future readers:
In version
2.5.0
, you need to useimport * as io from 'socket.io-client';
.