Skip to content

Instantly share code, notes, and snippets.

@kristijan-pajtasev
Created November 25, 2020 10:49
import {useEffect} from 'react';
import ChatAPI from './ChatAPI';
function ChatComponent() {
useEffect(() => {
ChatAPI.subscribe();
return () => {
ChatAPI.unsubscribe();
}
})
return <div>Chat Component</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment