You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Can't find corresponding selector for this component. Please check the supported components from Azure Communication UI Feature Component List."
145
-
);
141
+
throw"Can't find corresponding selector for this component. Please check the supported components from Azure Communication UI Feature Component List.";
146
142
}else{
147
-
thrownewError(
148
-
'Could not find props for this component, ensure the component is wrapped by appropriate providers.'
149
-
);
143
+
throw'Could not find props for this component, ensure the component is wrapped by appropriate providers.';
150
144
}
151
145
};
152
-
153
-
/**
154
-
* Helper function to pull the necessary properties for a chat component. There is a general usePropsFor
155
-
* function however since it can pull in for both calling and chat you will not be able to leverage any treeshaking
Copy file name to clipboardexpand all lines: packages/storybook8/stories/StatefulClient/BestPractices.mdx
-5
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,6 @@ By using the stateful client for calling or chat, you are on our recommended pat
17
17
If you are using our provided UI Components, `usePropsFor` will help you get integrated with the underlying functionality quickly. This provides a series of properties our
18
18
provided components are expecting from the stateful client to render an experience your users will be expecting. This is the fastest way to get your experience up and running with Azure Communication Services.
19
19
20
-
If you are building calling specific or chat specific scenarios it may be advantageous to use the `useCallingPropsFor` or `useChatPropsFor` functions instead of `usePropsFor`.
21
-
Since `usePropsFor` can grab references to calling or chat components it tells the treeshaking process I am going to need both Calling and Chat functionality and will not treeshake out those dependencies.
22
-
If you are looking to reduce the bundle size further and you are building a chat scenario we would recommend using `useChatPropsFor` instead of `usePropsFor` and skip pulling in any calling dependencies.
23
-
Similarly for calling scenarios you will want to use `useCallingPropsFor` and treeshake out any chat specific dependencies.
24
-
25
20
## You can use your own UI Components
26
21
27
22
Today you can use `useSelector` to connect your own components to create your own experiences! We use `useSelector` under the hood when you leverage our `usePropsFor` hook.
0 commit comments