-
I've been trying to use socket.io in a project I'm working on but no matter what approach I use, I always get a "TypeError: Super expression must either be null or a function" the very second I try to import the socket file into any component. I was wondering if there are any known compatibility issues with React v16 and fixes for them or if this is more of a problem with react rather than socket.io. Any help would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well, from what I observed during my troubleshooting, socket.io-client 4.6.0 does is not compatible with React 16.8.6. While this isn't a solution to the problem, at least if somebody else gets this error they hopefully find this discussion thread. Maybe you could try using older versions of socket.io. Edit: Version 2.3.0 seems to work fine with this version of react. |
Beta Was this translation helpful? Give feedback.
Well, from what I observed during my troubleshooting, socket.io-client 4.6.0 does is not compatible with React 16.8.6. While this isn't a solution to the problem, at least if somebody else gets this error they hopefully find this discussion thread. Maybe you could try using older versions of socket.io.
Edit: Version 2.3.0 seems to work fine with this version of react.