Skip to content

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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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