Hooks
In UIKit for React Native, there are various custom hooks
Note: In order to use the hooks provided by UIKit, you must set them as child components of
SendbirdUIKitContainer
.
useSendbirdChat()
The useSendbirdChat()
hook requests data from the Chat SDK on the current user's information.
useConnection()
The useConnection()
hook allows the Chat SDK to either connect or disconnect a user from the Sendbird server.
If you set the value of enableAutoPushTokenRegistration
to true
, the registration of a user's push token registration automatically turns on and off when the user is connected or disconnected from the server. The default value of this method is true
.
useUIKitTheme()
The useUIKitTheme()
hook allows you to use the default UIKItTheme
.
usePlatformService()
The usePlatformService()
hook lets you use the platform service interfaces that allow you to access all the features of the native module.
useLocalization()
The useLocalization()
hook allows you to use the default StringSet
provided by UIKit for React Native.
useToast()
The useToast()
hook allows you to display all toast messages in UIKit through the Toast
component.
usePrompt()
The usePrompt()
hook allows you to receive a text input from the current user through the Prompt
component.
useBottomSheet()
The useBottomSheet()
hook displays a menu of items from the bottom of the screen through the BottomSheet
component.
The useActionMenu()
hook allows you to display a menu of items on the screen through the ActionMenu
component.
useAlert()
The useAlert()
hook allows you to display an alert dialog on the screen through the Alert
component.