You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We tried updating to v5 today, functionally all is fine, but we are seeing a build warning locally:
WARNING in ./node_modules/react-accessible-accordion/dist/es/index.js 548:16-21
export 'useId' (imported as 'useId') 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)
webpack 5.22.0 compiled with 1 warning in 12733 ms
I don't have a reproduction repository at the moment unfortunately, but can confirm we are on React 16.13.1 (currently in the process of updating to React 17).
Interestingly, it seems like the MUI folks decided to roll back the useId changes until React 18 is released (because they don't need them right now for React 18 experimentation). mui/material-ui#29860 (comment)
For the moment we're going to stick with v4 to avoid the noise.
Feel free to close this issue if this project's priority is getting compatibility with React 18 sooner rather than later - just wanted to raise this with you folks to get a bit of traction with the webpack fix, and to give you a heads up about the MUI approach.
Thanks!
The text was updated successfully, but these errors were encountered:
V5 is a release we cut explicitly for React 18 support (Hence the major upgrade, this was a breaking change, the webpack fix would not work as we are using React 18 new APIs), we are sticking with V4 for React 17 and under compatibility, using V4 has no functional difference outside of React version compatibility.
V5 is a release we cut explicitly for React 18 support (Hence the major upgrade, this was a breaking change, the webpack fix would not work as we are using React 18 new APIs), we are sticking with V4 for React 17 and under compatibility, using V4 has no functional difference outside of React version compatibility.
mui v4 doesn't play well with vite build (vite 5.3.1).
After vite build, many v4 components' styles are broken, such as <Fab />.
And v4 also seems to be broken with parcel build (ref)
In short:
To build in vite/parcel, you need to upgrade to mui v5.
To upgrade to mui v5, you need to upgrade to react 18.
What a ****
We tried updating to v5 today, functionally all is fine, but we are seeing a build warning locally:
I don't have a reproduction repository at the moment unfortunately, but can confirm we are on React 16.13.1 (currently in the process of updating to React 17).
A very similar issue happened recently over in material-ui too - mui/material-ui#29860
Looks like this warning is a webpack limitation (webpack/webpack#14814).
Interestingly, it seems like the MUI folks decided to roll back the useId changes until React 18 is released (because they don't need them right now for React 18 experimentation).
mui/material-ui#29860 (comment)
For the moment we're going to stick with v4 to avoid the noise.
Feel free to close this issue if this project's priority is getting compatibility with React 18 sooner rather than later - just wanted to raise this with you folks to get a bit of traction with the webpack fix, and to give you a heads up about the MUI approach.
Thanks!
The text was updated successfully, but these errors were encountered: