-
Notifications
You must be signed in to change notification settings - Fork 80
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
Always omit "callbackId" prop #714
Conversation
src/util/component-types.js
Outdated
export function omitProps(props, type, keys = []) { | ||
return _.omit(props, _.keys(type.propTypes).concat(keys).concat(['initialState'])); | ||
return _.omit(props, _.keys(type.propTypes).concat(keys).concat(['initialState', 'callbackId'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about this a little bit, but if our goal is for this prop to cover all closure cases, I think it would be nice if the name were more general rather than tied to id
.
Ideas: callbackProp
, callbackProps
, callbackValue
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking a little bit about this, it seems like the 95% case is going to be an id
and we should name it accordingly. It also encourages people to keep use something simple that's uniquely identifiable.
Yeah it technically can be object, but I don't think that's something we need to advertise.
Found a bug w/ |
It's probably bad that my initial instinct was, "The tests must be wrong"... |
Codecov Report
@@ Coverage Diff @@
## master #714 +/- ##
==========================================
+ Coverage 91.46% 91.46% +<.01%
==========================================
Files 157 157
Lines 2682 2684 +2
Branches 743 744 +1
==========================================
+ Hits 2453 2455 +2
Misses 219 219
Partials 10 10
Continue to review full report at Codecov.
|
PR Checklist
Manually tested across supported browsersUnit tests written (common
at minimum)semver-
labelsOne core team UX approval