[v3.1.2] (Aug 31 / Sept 1 2022)
Migrate UI components into TypeScript
This doesnt affect anyone, it a step in task to migrate the project source code into TS
Fixes:
-
Type defn: Change type of react elements to
React.ReactElement- Change every
React.ReactNodeandReact.ComponenttoReact.ReactElement - Use the type of SendbirdError
- Use the type MessageSearchQueryParams
- Use enum MessageSearchOrder.TIMESTAMP in the message search query params instead of
'ts' as const
ReactNode could be
string | number | null | undefined | ReactElement | portaland this(expecting string or number) causes warning when we use it like<CustomComp />// in the component { renderMessage } = props const CustomMessage = useMemo(() => { return renderMessage({ ... }); }, []); return ( <div> <CustomMessage /> </div> );
so expecting ReactElement is better for our case
- Change every
-
Fix message grouping:
Set isMessageGroupingEnabed to true(was set to false during v2 migration)