Skip to content

Molecule3D dependency doesn't work with React version 16.0 and above #313

@shammamah-zz

Description

@shammamah-zz

In React v15.5, propTypes have been moved to an external package (announcement: https://reactjs.org/blog/2017/04/07/react-v15.5.0.html)

From the announcement:

Prop types are a feature for runtime validation of props during development. We’ve extracted the built-in prop types to a separate package to reflect the fact that not everybody uses them.
In 15.5, instead of accessing PropTypes from the main React object, install the prop-types package and import them from there:

The dash-core-components library now uses React v16.0 (upgraded from React v15.4), and this results in a breaking change for one of our dependencies (Molecule3D):

https://github.com/Autodesk/molecule-3d-for-react/blob/ea30999599755f916a1db1d321b198e21348d1a6/src/components/molecule_3d.jsx#L53

https://reactjs.org/warnings/dont-call-proptypes.html#dont-call-proptypes-directly
From the above link:

If you don’t fix the warning, this code will crash in production with React 16.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions