Please refer to Weavy docs for detailed documentation.
The UIKit React has been replaced with a UIKit powered by the @weavy/uikit-web
Web components. It comes with regular React components for Weavy Blocks and React hooks for simplified configuration and usage. That means regular React components have access to all the latest features and updates provided in UIKit Web.
The previously imported stylesheet is no longer used. Remove any references and style overrides. All new styling options can be found in the UIKit Web styling documentation.
The tokenFactory
can optionally be replaced with a tokenUrl
as long as the API endpoint returns a JSON-encoded access_token
.
WeavyClient
has been replaced with a configuration using a useWeavy
hook or using a predefined <WyContext />
provider. This means there is no requirement to use a <WeavyProvider>
. You may also just replace the new WeavyClient()
with the underlying new Weavy()
.
- Change the name of
new WeavyClient({ ...options })
tonew Weavy({ ...options })
. - Remove the
<WeavyProvider>...</WeavyProvider>
tag.
- Replace the
<WeavyProvider>
tag with<WyContext url={WEAVY_URL} tokenFactory={async () => "access_token" }>
- Remove the
WeavyClient
instance.
- Replace
new WeavyClient({ ...options })
withuseWeavy({...options })
and place the hook inside any top-level component such as yourApp
component. - Remove the
<WeavyProvider>...</WeavyProvider>
tag.
The names of the React components has changed to have a common Wy
prefix and align with the naming of the blocks in UIKit Web. Rename the imports and tags for your components.
Please refer to UIKIt Web documentation if you want to create a custom Messenger to replace the MessengerProvider.
Previous component | New component |
---|---|
<Chat /> |
<WyChat /> |
<Files /> |
<WyFiles /> |
<Messenger /> |
<WyMessenger /> |
<Posts /> |
<WyPosts /> |
<WeavyProvider /> |
<WyContext /> |
<MessengerProvider /> |
N/A |
<ConversationList /> |
<WyConversationList /> |
<Conversation /> |
<WyConversation /> |
<ConversationBadge /> |
<WyBadge /> |