-
Notifications
You must be signed in to change notification settings - Fork 58
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
CPLAT-9327 Improve forwardRef documentation, add displayName argument #454
CPLAT-9327 Improve forwardRef documentation, add displayName argument #454
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
05a0662
to
9c8825e
Compare
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.
+1
Also, should this go into a function components WIP branch if it's dependent on changes in the react-dart 5.4.0-wip? |
…ion, remove unused code
/// | ||
/// UiFactory<LogPropsProps> _LogProps = _$_LogProps; | ||
/// | ||
/// mixin LogPropsProps on UiProps { |
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.
Please double check the boilerplate here - I updated this example from what it was previously.
@smaifullerton-wk I don't think the stuff you need from the |
@greglittlefield-wf is there a function components wip branch here? I see both this - and Sydney's function component PRs with a base branch of |
@aaronlademann-wf I don't believe there is one, no, but we could make one! |
…mentation # Conflicts: # pubspec.yaml
@greglittlefield-wf created the branch / updated the base branch of this PR. (I'll update Sydney's as well) |
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.
+10 except for CI failing; looks like generated files just need to be updated (pbr build
+ commit)
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.
+10
@Workiva/release-management-p
Motivation
While grokking our
forwardRef
API, I found myself wanting some implementation examples which could not be found in the documentation comment.I also noticed that consumers had no way to define a
displayName
for the wrapper HOC created byforwardRef
.Changes
These changes address both issues by adding extensive examples in the documentation comment for
forwardRef
that mirror the analogous ReactJS forwardRef documentation, and by adding adisplayName
argument to the function which then gets set on the JS side via a call todefineProperty
.Release Notes
Allow custom displayName values for
forwardRef
wrapper components.Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review: @greglittlefield-wf @joebingham-wk @sydneyjodon-wk
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: