Skip to content

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

@dufia

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions