Last active
June 3, 2022 08:55
-
-
Save oney/f65e3f82e1382c656179882e65d1d4a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
socket.on('connected', async () => { | |
await checkConnection(selectedRoom); | |
showToast(theme, 'Connected to ' + connectedRoom); | |
// I just want to call showToast with one line | |
// Why I must define a new callback with 3 lines | |
// of code outside of effect?? 🤨 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment