Skip to content

Addresses #265: fix minor bugs in Example Implementation#266

Open
darkhaniop wants to merge 1 commit intorobtaussig:masterfrom
darkhaniop:issue-265-example-implementation-patch0
Open

Addresses #265: fix minor bugs in Example Implementation#266
darkhaniop wants to merge 1 commit intorobtaussig:masterfrom
darkhaniop:issue-265-example-implementation-patch0

Conversation

@darkhaniop
Copy link

Fixes two minor bugs described in #265:

1. messageHistory state instantiation bug

The messageHistory state instantiation updated to:

const [messageHistory, setMessageHistory] = useState<MessageEvent<any>[]>([]);

2. The WebSocketDemo component markup

Made its output look a little more legible. Below is the example output after the fix in a blank app:

react-use-websocket-example-ui-issue-fix

Addresses two minor bugs in the first usage example in README.md:
- messageHistory state instantiation bug
- WebSocketDemo markup

Issue robtaussig#265
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

Successfully merging this pull request may close these issues.

1 participant