Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sockets.current[namespaceKey] can be undefined in ioProvider.tsx #32

Open
dufia opened this issue Jan 21, 2024 · 2 comments
Open

sockets.current[namespaceKey] can be undefined in ioProvider.tsx #32

dufia opened this issue Jan 21, 2024 · 2 comments

Comments

@dufia
Copy link

dufia commented Jan 21, 2024

I run into this issue where sockets.current[namespaceKey] can be undefined in ioProvider.tsx, I am referring to https://github.com/nitedani/socket.io-react-hook/blob/main/packages/socket.io-react-hook/src/IoProvider.tsx#L89.

Although it was semi reliably take place in my app when parent of component was re-rendering, I wasn't able to reproduce it with examples in your repo.

I ended up patching to (check if it's defined), I created this issue for visibility, in case someone else experiences the problem.

@JungYOsup
Copy link

JungYOsup commented Aug 9, 2024

@dufia

I run into this issue where sockets.current[namespaceKey] can be undefined in ioProvider.tsx, I am referring to https://github.com/nitedani/socket.io-react-hook/blob/main/packages/socket.io-react-hook/src/IoProvider.tsx#L89.

Although it was semi reliably take place in my app when parent of component was re-rendering, I wasn't able to reproduce it with examples in your repo.

I ended up patching to (check if it's defined), I created this issue for visibility, in case someone else experiences the problem.

Hello my friend, I am also experiencing the same problem.

Can you tell me with code how you solved this problem?

@dufia
Copy link
Author

dufia commented Aug 9, 2024

Hey, I had to implement a custom solution instead of using this library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants