-
-
Save sendbird-community/ffbfd734172f6c2d985c002e545ca805 to your computer and use it in GitHub Desktop.
How to use the OpenChannel module
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
import OpenChannel from '@sendbird/uikit-react/OpenChannel'; | |
import { OpenChannelProvider, useOpenChannelContext } from '@sendbird/uikit-react/OpenChannel/context'; | |
const MyComponent = () => { | |
const openChannelState = useOpenChannelContext(); | |
return ( | |
...render custom component | |
); | |
}; | |
<OpenChannelProvider> | |
<MyComponent /> | |
<OpenChannelProvider/> | |
const UserProfile = () => { | |
const openChannelState = useOpenChannelContext(); | |
return ( | |
...render custom component | |
); | |
}; | |
<OpenChannel | |
renderUserProfile={UserProfile} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment