dash
dash copied to clipboard
add prop types to tsx components
Fix #3014
We use the propTypes
defined on the react components to provide runtime prop validation on dash components. This property is missing from typescript components as they don't define that attribute, this PR generate propTypes for the components using the extracted metadata and saves it in a proptypes.js
in the package directory. This file should be added as a dev dependencies in the package __init__.py
_js_dist
like this:
_js_dist = [
...,
"dev_package_path": "proptypes.js",
"namespace": "package"
]