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
[DatePicker] Reduce coupling of parsing picker input value and props #24319
Conversation
@oliviertassinari This affects more than the DatePicker. If you think otherwise, please explain it instead of changing things without comment. |
I believe that so far, we have used the "DatePicker" PR label and It's similar to how we have used the "Tabs" PR label and The incentive was to reproduce the DX as if the component/family of components was under its own repository, isolated. We link this label in the documentation under: |
What's that and why did you use angle brackets? Angle brackets resemble JSX syntax.
Then why is it named
Then we should use a different naming scheme. |
But then we should apply all the picker labels not just DatePicker. |
And then also: We link to issues. So this is not even all that relevant. |
We were passing the full props object to
parsePickerInputValue
when we only ever needed the value. Removed this unnecessary coupling so that it's more apparent when we actually need to run the effect that re-computes this.This revealed that the reason for disabling
react/exhaustive-dependencies
was outdated. It only served micro-optimization because, right now, every call site ofusePickerState
passed a stablevalueManager
so using it as a dependency was extraneous. However, this might break in the future so we need to be aware of it.In the end we probably don't need the effect anyway (#24315) but in order to reason about the code I need to trim all the unnecessary parts.