Skip to content

Instantly share code, notes, and snippets.

@sendbird-community
Created December 3, 2022 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sendbird-community/f04d329f5ce7f36329e0f4284d315256 to your computer and use it in GitHub Desktop.
Save sendbird-community/f04d329f5ce7f36329e0f4284d315256 to your computer and use it in GitHub Desktop.
How to implement ChannelList
import { useChannelListContext, ChannelListProvider } from '@sendbird/uikit-react/ChannelList/context';
import ChannelList from '@sendbird/uikit-react/ChannelList';
const MyComponent = () => {
const channelListState = useChannelListContext();
return (
...render custom component
);
};
<ChannelListProvider>
<MyComponent />
<ChannelListProvider/>
const MyPlaceholder = () => {
const channelListState = useChannelListContext();
return (
...render custom component
);
};
<ChannelList
renderPlaceHolderLoading={MyPlaceholder}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment