-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
Because the children argument of a component can take a single element or a list, e.g.
html.Div(html.Div())
html.Div([html.Div(), html.Div()])
I can easily make the mistake of not putting the children in a list, e.g.:
html.Div(html.Div(), html.Div())
In this case I do not get any kind of error, and instead the 2nd Div is stringified and becomes part of the id for the parent component.
In very large applications this is easy to lose. If type information was provided then IDEs like Pycharm would highlight this issue and tools like MyPy would warn before the code was ever run.
mungojam