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

Change return values #5

Closed
parweb opened this issue Nov 29, 2018 · 2 comments
Closed

Change return values #5

parweb opened this issue Nov 29, 2018 · 2 comments

Comments

@parweb
Copy link

parweb commented Nov 29, 2018

https://github.com/mfrachet/use-socketio/blob/73601fec48506de4eada21f6f3bdb1aef92122cf/src/useSocket.js#L11

Could be ? (check https://github.com/parweb/use-socketio/pulls?q=is%3Apr+is%3Aclosed)
return [value, (message) => socket.emit(eventKey, message), socket];

@mfrachet
Copy link
Owner

It absolutely could 😊 You can pr on this if you'd like to 😄

@mfrachet
Copy link
Owner

Since the v1.0.0 has been published, it's not possible to rely on a callback to avoid unecessary state modifications

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