-
-
Save sendbird-community/314c01c26a9bd0e932ec255578eac7eb to your computer and use it in GitHub Desktop.
How to implement message search
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 MessageSearch from '@sendbird/uikit-react/MessageSearch; | |
import { MessageSearchProvider, useMessageSearchContext } from '@sendbird/uikit-react/MessageSearch/context'; | |
const MyComponent = () => { | |
const messageSearchState = useMessageSearchContext(); | |
return ( | |
...render custom component | |
); | |
}; | |
<MessageSearchProvider> | |
<MyComponent /> | |
<MessageSearchProvider/> | |
const EmptyListView = () => { | |
const messageSearchState = useMessageSearchContext(); | |
return ( | |
...render custom component | |
); | |
}; | |
<MessageSearch | |
renderPlaceholderEmptyList={EmptyListView} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment