Closed skjelmo closed 11 months ago
https://codesandbox.io/p/sandbox/stoic-easley-g6lstz
Starting the sandbox should output:
ERROR in ./node_modules/@uppy/react/lib/useUppyState.js 5:9-29 export 'useSyncExternalStore' (imported as 'useSyncExternalStore') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version)
Sandbox is using DashboardModal from @uppy/react in app/components/Root/Root.js
DashboardModal
@uppy/react
app/components/Root/Root.js
I get the same locally when compiling with webpack.
Expected @uppy/react to compile with react 16 since it is a peerDependency.
Seems to fail because useSyncExternalStore imported by useUppyState.js is not available before react 18.
useSyncExternalStore
useUppyState.js
Compilation fails.
Hi, thank you for reporting. We are looking into this, will probably revert the change for now and issue a patch release. Apologies for the inconvenience.
Initial checklist
Link to runnable example
https://codesandbox.io/p/sandbox/stoic-easley-g6lstz
Steps to reproduce
Starting the sandbox should output:
Sandbox is using
DashboardModal
from@uppy/react
inapp/components/Root/Root.js
I get the same locally when compiling with webpack.
Expected behavior
Expected @uppy/react to compile with react 16 since it is a peerDependency.
Seems to fail because
useSyncExternalStore
imported byuseUppyState.js
is not available before react 18.Actual behavior
Compilation fails.