https://discord.gg/botpress logo
Documentation for updated webchat react hooks miss...
# 🤝help
f
Where can I find any information about this?
Copy code
@deprecated
This hook is deprecated. Use WebchatProvider with useActiveConversation, useConversations, and useUser instead.

Migration guide:

// Old:
const { messages, sendMessage, client } = useWebchat({ clientId, ... })

// New:
<WebchatProvider clientId={clientId} ...>
const { messages, sendMessage } = useActiveConversation()
const { listConversations, openConversation } = useConversations()
const { getUser, updateUser } = useUser()
</WebchatProvider>
useWebChat has now been marked as deprecated
l
Where did you get this from?
f
The inline docs in the typescript types list useWebchat as deprecated and show those docs. So I am seeing this in my code editor and am now wondering where is this documented. Because these changes are coming up quite unexpected.
Thats why all of this should be open source anyways and we need a proper changelog.
w
yeah seems like the documentation also hasn't been updated yet on the useWebchat deprecation
l
Waiting for update on my side will get back when I get news!