Limit generated components to 250 explicit args by default #2029
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
configurable to any other number
Keep this to 253 or below for Py3.6 support. Props beyond those explicitly listed can still be used, they must just be invoked as kwargs. Also I believe that in Py3.6 it will still not be possible to use ALL props of a component if there are >253 - it's not just the function signature that's limited but also any individual function call. That's not a big deal, app developers want access to all of these props but they're very unlikely to actually use them all simultaneously. But it's possible that we'll want to set the limit lower than 250, in case the limit is (total # of named props) + (total unnamed props used simultaneously) - this I haven't tested.
In general, if you get up to hundreds of props in your component, it's a sign that you might want to refactor... group some of them together to make them easier to learn and work with, for example. But there are cases you want more - this PR is prompted by
dash-ag-grid
where we're wrapping another component (ag-grid) that exposes 265 props, and we're just forwarding them on to dash.CHANGELOG.md