Open eps1lon opened 5 months ago
Will this be implemented soon? We would love to upgrade to react 19 while using tremor components :)
Upgrading package.json
to recharts@2.13.0
should fix this: https://github.com/recharts/recharts/issues/4558
Currently getting this from @headlessui/react
when trying to use Tremor with React v19.
./node_modules/@tremor/react/node_modules/@headlessui/react/dist/utils/stable-collection.js
Attempted import error: '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' is not exported from 'react' (imported as 'r').
Import trace for requested module:
./node_modules/@tremor/react/node_modules/@headlessui/react/dist/utils/stable-collection.js
./node_modules/@tremor/react/node_modules/@headlessui/react/dist/components/tabs/tabs.js
__barrel_optimize__?names=Tab!=!./node_modules/@tremor/react/node_modules/@headlessui/react/dist/headlessui.esm.js
./node_modules/@tremor/react/dist/components/input-elements/Tabs/TabGroup.js
__barrel_optimize__?names=Tab,TabGroup,TabList!=!./node_modules/@tremor/react/dist/index.js
@rminami you can force the @headlessui/react to version 2.20 using resolutions in your package.json file. This isn't a great solution for a production application but might work as a holdover until it's updated.
What problem does this feature solve?
React 19 is already past its Alpha phase. During Alpha, libraries are encourage to start working on React 19 compatibility. This helps us flush out potential bugs before app developers start adopting React 19.
What does the proposed API look like?
At a glance,
recharts
and@headlessui/react
are the libraries that are incompatible that stand out.recharts@2.13.0-alpha.3
should fix most of the compat issues (already tracked in https://github.com/tremorlabs/tremor/issues/1054).@headlessui/react
had this compat issue: https://github.com/tailwindlabs/headlessui/issues/3167. https://github.com/tailwindlabs/headlessui/issues/3167 is already fixed onmain
. However,@tremor/react
still uses 1.x so you'd need to bump@headlessui/react
to 2.x first to have a chance of getting the fix for@headlessui/react
.