Skip to content

Commit 050be89

Browse files
authored
[v3.1.2] (Aug 31 2022) (#278)
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.ReactNode` and `React.Component` to `React.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 | portal` and this(expecting string or number) causes **warning** when we use it like `<CustomComp />` ```typescript // in the component { renderMessage } = props const CustomMessage = useMemo(() => { return renderMessage({ ... }); }, []); return ( <div> <CustomMessage /> </div> ); ``` so expecting **ReactElement** is better for our case * Fix message grouping: Set isMessageGroupingEnabed to true(was set to false during v2 migration) https://sendbird.atlassian.net/browse/SDKRLSD-466
1 parent d5f9305 commit 050be89

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog - v3
22

3+
## [v3.1.2] (Aug 31 2022)
4+
5+
* Migrate UI components into TypeScript
6+
This doesnt affect anyone, it a step in task to migrate the project source code into TS
7+
8+
Fixes:
9+
* Type defn: Change type of react elements to `React.ReactElement`
10+
* Change every `React.ReactNode` and `React.Component` to `React.ReactElement`
11+
* Use the type of SendbirdError
12+
* Use the type MessageSearchQueryParams
13+
* Use enum MessageSearchOrder.TIMESTAMP in the message search query params instead of `'ts' as const`
14+
15+
**ReactNode** could be `string | number | null | undefined | ReactElement | portal` and this(expecting string or number) causes **warning** when we use it like `<CustomComp />`
16+
```typescript
17+
// in the component
18+
{ renderMessage } = props
19+
const CustomMessage = useMemo(() => {
20+
return renderMessage({ ... });
21+
}, []);
22+
return (
23+
<div>
24+
<CustomMessage />
25+
</div>
26+
);
27+
```
28+
so expecting **ReactElement** is better for our case
29+
* Fix message grouping:
30+
Set isMessageGroupingEnabed to true(was set to false during v2 migration)
31+
332
## [v3.1.1] (Aug 17 2022)
433

534
Features:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sendbird/uikit-react",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "React based UI kit for sendbird",
55
"main": "dist/index.js",
66
"style": "dist/index.css",

0 commit comments

Comments
 (0)