-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[charts] Add typedocs to pubic hooks
and improve types
#15545
base: master
Are you sure you want to change the base?
Conversation
Deploy preview: https://deploy-preview-15545--material-ui-x.netlify.app/ |
CodSpeed Performance ReportMerging #15545 will not alter performanceComparing Summary
|
I'm wondering if the current hook is the best DX. If we provide something like useBarSeries(['seriesId1', 'seriesId2']) // Returns the config of the series
useBarSeries() // Returns all bar series in the correct order It might be easier to use |
Do you see a lot of value in returning an array for allowing multiple items to be returned or only allow one return per call? const a = useSeries('a')
const b = useSeries('b')
vs
const [a,b] useSeries('a', 'b') |
The array has the advantage to be easier to understand and to allow adding extra arguments later. But I'm not sure if passing an array like Maybe we should wait for the end of the plugin migration to see if one DX allows easier perf otpimisation than the other |
Optimisation-wise we can just |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Cherry-picked from mui#15545
Cherry-picked from mui#15545
Cherry-picked from mui#15545
Cherry-picked from mui#15545
Cherry-picked from mui#15545
6d2192a
to
7a70ef4
Compare
useSeries
and useXxxSeries
hookshooks
and improve types
useXxxSeries
hooks and add more use-cases