Open mti-at-ili opened 1 year ago
Dash itself still by default still runs with React 16, regardless of what you've defined in your component. As described in the Dash 2.9 changelog we added:
Experimental support for React 18. The default is still React v16.14.0, but to use React 18 you can either set the environment variable
REACT_VERSION=18.2.0
before running your app, or inside the app calldash._dash_renderer._set_react_version("18.2.0")
. THIS FEATURE IS EXPERIMENTAL. It has not been tested with component suites outside the Dash core, and we may add or remove available React versions in any future release.
Thanks @alexcjohnson. It resolved my issue and has been able to load my application throught React 18.
When running a project created by cookiecutter and boilerplate, I am upgrading the react and react-dom package to latest which is 18.2.0 at the moment. I am upgrading to 18.2.0 to use chakra-ui in my components. When using ChakraProvider as the main html element of my component. I get an exception after executing the usage.py, even
npm run build
works fine. The exception trace is:My React Component Code is:
My package.json file:
My environment: Python 3.10.6 dash 2.10.0 chakra-ui 2.6.1