Skip to content

Commit

Permalink
Use React shim package to support older React versions
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Dec 9, 2024
1 parent eb4d195 commit 442c7c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"@braintree/sanitize-url": "^6.0.4",
"@popperjs/core": "^2.11.5",
"@react-aria/focus": "^3",
"@types/use-sync-external-store": "^0.0.6",
"clsx": "^2.0.0",
"dayjs": "^1.10.4",
"emoji-regex": "^9.2.0",
Expand Down Expand Up @@ -132,7 +133,8 @@
"textarea-caret": "^3.1.0",
"tslib": "^2.6.2",
"unist-builder": "^3.0.0",
"unist-util-visit": "^5.0.0"
"unist-util-visit": "^5.0.0",
"use-sync-external-store": "^1.4.0"
},
"optionalDependencies": {
"@stream-io/transliterate": "^1.5.5",
Expand Down
3 changes: 2 additions & 1 deletion src/store/hooks/useStateStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useCallback, useMemo, useSyncExternalStore } from 'react';
import { useCallback, useMemo } from 'react';
import { useSyncExternalStore } from 'use-sync-external-store/shim';

import type { StateStore } from 'stream-chat';

Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2769,6 +2769,11 @@
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==

"@types/use-sync-external-store@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz#60be8d21baab8c305132eb9cb912ed497852aadc"
integrity sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==

"@types/uuid@^8.3.0":
version "8.3.0"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.0.tgz#215c231dff736d5ba92410e6d602050cce7e273f"
Expand Down Expand Up @@ -13197,6 +13202,11 @@ use-latest@^1.0.0:
dependencies:
use-isomorphic-layout-effect "^1.0.0"

use-sync-external-store@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz#adbc795d8eeb47029963016cefdf89dc799fcebc"
integrity sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==

use@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
Expand Down

0 comments on commit 442c7c7

Please sign in to comment.