-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[base] Add explicit interfaces for the return values of the public hooks #35933
Comments
Hi, I'd like to give the |
Hi! I would like to take the |
hello, i'd like to take useMenu. |
Hi! I'd like to take |
created a PR for useSlider. |
Hey I'd like to take useSelect, thanks |
I'm doing a pretty big refactoring in the useSelect hook, and I'll add these types in the process. |
sure happy to do so thanks |
@michaldudak @mnajdova created a PR for useSlider thanks |
Is it possible to take |
@kimiyahajizadeh |
All done. |
Summary 💡
As we are adding API pages for the public hooks of MUI Base, we need to have explicit interfaces for the return values. The interfaces' names should follow the naming pattern:
${HookName}ReturnValue
, for example:UseButtonReturnValue
. This is the list of all hooks we have at this moment:useFormControlUnstyledContext
hook #36302If you plan to work on some of the hooks, please leave a comment on the issue.
Examples 🌈
As an example, you can take a look at the
UseButtonReturnValue
. This is how the API page section for the return value will look like: https://deploy-preview-35828--material-ui.netlify.app/base/api/use-button/#return-valueMotivation 🔦
Having explicit hooks for the return values will help with the type check performances, and will allow us to extract the values in the API pages.
The text was updated successfully, but these errors were encountered: