Skip to content

Commit

Permalink
Add shim to support React 17+
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclay committed Jul 24, 2022
1 parent 75dd135 commit 22b76b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@
"react-test-renderer": "17.0.2",
"shelljs": "0.8.4"
},
"bugs": "https://github.com/teafuljs/teaful/issues"
"bugs": "https://github.com/teafuljs/teaful/issues",
"dependencies": {
"use-sync-external-store": "^1.2.0"
}
}
1 change: 1 addition & 0 deletions package/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useEffect, useReducer, createElement} from 'react';
import {useSyncExternalStore} from 'use-sync-external-store/shim';

let MODE_GET = 1;
let MODE_USE = 2;
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5586,6 +5586,11 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"

use-sync-external-store@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==

util-deprecate@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
Expand Down

0 comments on commit 22b76b3

Please sign in to comment.