-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Stabilize useSeries
and useXxxSeries
hooks
#15545
base: master
Are you sure you want to change the base?
Conversation
Deploy preview: https://deploy-preview-15545--material-ui-x.netlify.app/ Updated pages: |
CodSpeed Performance ReportMerging #15545 will degrade performances by 10.6%Comparing Summary
Benchmarks breakdown
|
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. |
Also added docs to all public hooks
Changelog
useSeries
anduseXxxSeries
have been stabilized and renamed accordingly. Removing theunstable_
prefix. — Learn more.