Skip to content

Commit 22b76b3

Browse files
committed
Add shim to support React 17+
1 parent 75dd135 commit 22b76b3

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,8 @@
102102
"react-test-renderer": "17.0.2",
103103
"shelljs": "0.8.4"
104104
},
105-
"bugs": "https://github.com/teafuljs/teaful/issues"
105+
"bugs": "https://github.com/teafuljs/teaful/issues",
106+
"dependencies": {
107+
"use-sync-external-store": "^1.2.0"
108+
}
106109
}

package/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {useEffect, useReducer, createElement} from 'react';
2+
import {useSyncExternalStore} from 'use-sync-external-store/shim';
23

34
let MODE_GET = 1;
45
let MODE_USE = 2;

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -5586,6 +5586,11 @@ uri-js@^4.2.2:
55865586
dependencies:
55875587
punycode "^2.1.0"
55885588

5589+
use-sync-external-store@^1.2.0:
5590+
version "1.2.0"
5591+
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
5592+
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
5593+
55895594
util-deprecate@^1.0.2:
55905595
version "1.0.2"
55915596
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"

0 commit comments

Comments
 (0)