Skip to content

support react 19#3646

Draft
T4rk1n wants to merge 9 commits intodevfrom
react19
Draft

support react 19#3646
T4rk1n wants to merge 9 commits intodevfrom
react19

Conversation

@T4rk1n
Copy link
Copy Markdown
Contributor

@T4rk1n T4rk1n commented Mar 11, 2026

  • Remove react 16 support.
  • Add react 19 experimental support, use with:
from dash._dash_renderer import _set_react_version

_set_react_version("19.2.0")

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 11, 2026

Thank you for your contribution to Dash! 🎉

This PR is exempt from requiring a linked issue due to its labels.

@AnnMarieW
Copy link
Copy Markdown
Collaborator

Thanks for supporting React 19 🎉

I see all the tests pass, but when I run apps setting react to 19.2.0 some components work (like dcc.Markdown and dcc.Input) but others do not, such as dcc.RangeSlider and the date picker components. The error is:

Cannot read properties of undefined (reading 'ReactCurrentOwner')

I see the same error if I set react 19 in the tests for those components.

@ndrezn ndrezn linked an issue Mar 23, 2026 that may be closed by this pull request
@camdecoster camdecoster marked this pull request as draft April 15, 2026 15:26
@AnnMarieW
Copy link
Copy Markdown
Collaborator

I tried this again, and here's some more feedback:

The new React 19 shim seems to fix the ReactCurrentOwner error with DCC components.

I also tried a simple quick start app in a few other libraries:

  • dash-ag-grid 35.2 worked fine.
  • dash-daq 0.6.0 worked fine.
  • dash-bootstrap-components 2.0.4 had the errors shown below. DBC v2 is based on react-bootstrap v2 which does not support React.19, so that wasn't surprising.
  • dash-mantine-components 2.6.1 had the same errors as DBC. However, DMC v2 is based on Mantine v8 which is compatible with React 19, so that was a little unexpected.

Errors in both DMC and DBC if a component is defined in the app:

Uncaught TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')
at Array. (dash_bootstrap_components.v2_0_4m1759328733.min.js:2:12535)
at n (dash_bootstrap_components.v2_0_4m1759328733.min.js:2:13035)
at Array. (dash_bootstrap_components.v2_0_4m1759328733.min.js:2:12343)
at n (dash_bootstrap_components.v2_0_4m1759328733.min.js:2:13035)
at dash_bootstrap_components.v2_0_4m1759328733.min.js:2:17559
at dash_bootstrap_components.v2_0_4m1759328733.min.js:2:227635
at dash_bootstrap_components.v2_0_4m1759328733.min.js:2:227674

Also, if the component is added to the layout, the app doesn't render, and there is also the following errors:

Uncaught Error: dash_bootstrap_components was not found.
at Object.resolve (registry.js:15:15)
at getProps (persistence.js:293:30)
at persistenceMods (persistence.js:404:9)
at persistence.js:437:29
at Array.forEach ()
at persistenceMods (persistence.js:435:18)
at applyPersistence (persistence.js:370:12)
at APIController.react.js:161:53
at exports.unstable_batchedUpdates (react-dom.development.js:411:14)
at storeEffect (APIController.react.js:150:10)Understand this error

installHook.js:1 An error occurred in the component.
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.
overrideMethod @ installHook.js:1Understand this warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement support for React 19

3 participants