File tree Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Original file line number Diff line number Diff line change 5454 "dequal" : " ^2.0.2" ,
5555 "lz-string" : " ^1.4.4" ,
5656 "react-devtools-inline" : " 4.4.0" ,
57- "react-is" : " ^17.0.2" ,
58- "use-deep-compare-effect" : " 1.8.1"
57+ "react-is" : " ^17.0.2"
5958 },
6059 "devDependencies" : {
6160 "@babel/core" : " ^7.12.3" ,
Original file line number Diff line number Diff line change 11import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client" ;
22import { normalizePath } from "@codesandbox/sandpack-client" ;
3- import { useState } from "react" ;
4- import useDeepCompareEffect from "use-deep-compare-effect" ;
3+ import { useEffect , useState } from "react" ;
54
65import type {
76 SandboxEnvironment ,
@@ -57,9 +56,9 @@ export const useFiles: UseFiles = (props) => {
5756
5857 const [ state , setState ] = useState < FilesState > ( originalStateFromProps ) ;
5958
60- useDeepCompareEffect ( ( ) => {
59+ useEffect ( ( ) => {
6160 setState ( getSandpackStateFromProps ( props ) ) ;
62- } , [ props ] ) ;
61+ } , [ props . files , props . customSetup , props . template ] ) ;
6362
6463 const updateFile = (
6564 pathOrFiles : string | SandpackFiles ,
Original file line number Diff line number Diff line change @@ -18779,14 +18779,6 @@ use-clipboard-copy@^0.2.0:
1877918779 dependencies:
1878018780 clipboard-copy "^3.0.0"
1878118781
18782- use-deep-compare-effect@1.8.1:
18783- version "1.8.1"
18784- resolved "https://registry.yarnpkg.com/use-deep-compare-effect/-/use-deep-compare-effect-1.8.1.tgz#ef0ce3b3271edb801da1ec23bf0754ef4189d0c6"
18785- integrity sha512-kbeNVZ9Zkc0RFGpfMN3MNfaKNvcLNyxOAAd9O4CBZ+kCBXXscn9s/4I+8ytUER4RDpEYs5+O6Rs4PqiZ+rHr5Q==
18786- dependencies:
18787- "@babel/runtime" "^7.12.5"
18788- dequal "^2.0.2"
18789-
1879018782use-sync-external-store@1.2.0:
1879118783 version "1.2.0"
1879218784 resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
You can’t perform that action at this time.
0 commit comments