-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] dash-generate-components
does no longer recognize imported object in propTypes
#2096
Comments
In tsx files you have to use typescript props, I think there is a conflict in the props resolution in this case since you have the props in typescript in the example. So you can remove the |
@T4rk1n thanks for your quick reply. To be clear, I am not using the |
The |
|
Describe your context
structure.tsx
component.tsx
pip list | grep dash
belowDescribe the bug
Given the example above and running
dash-generate-components
withdash==2.5.1
results in:It seems
dash-generate-components
treatsStructurePropTypes
as a string and no longer as an imported object.However, when executing the same command with
dash==2.0.0
there is no exception raised.Expected behavior
I expect
dash-generate-components
to be able to correctly treat imported objects inpropTypes
. I'd like to store more complex objects describing the type of individual properties that are used by multiple components in additional files. I do not want to have the same object definition multiple places in my code.It might be that the newest version of
dash
is more strict about the analysis ofpropTypes
and that the older version did just ignore the error (did not encounter it because of a less deeper analysis). However, it would be nice to have this supported indash
.The text was updated successfully, but these errors were encountered: