-
Hi, I'm trying to real-time updates to a react web app and I saw online that the best approach to using websockets was to create a wrapper component of the socket and wrap it around the app component. Whenever I try to simply import the component (import WebSocketProvider from './WebSocketContext') into my app class component, I receive a "TypeError: Super expression must either be null or a function." I'm not sure if it's worth noting but my the websocket component is a functional component and my app component is a class component. Here is my websocket component:
I'm trying to find the cause for this error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hi! Did you check our React guide here: https://socket.io/how-to/use-with-react It does not use the |
Beta Was this translation helpful? Give feedback.
-
Socket.io 4.6.0 and React 16.8.6 aren't compatible |
Beta Was this translation helpful? Give feedback.
Socket.io 4.6.0 and React 16.8.6 aren't compatible