Skip to content
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

recompose dependency has been removed but the documentation still uses it #15954

Closed
Bouncue opened this issue May 30, 2019 · 7 comments · Fixed by #15989
Closed

recompose dependency has been removed but the documentation still uses it #15954

Bouncue opened this issue May 30, 2019 · 7 comments · Fixed by #15989
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@Bouncue
Copy link

Bouncue commented May 30, 2019

I have been using recompose/compose exactly like in the doc:

https://material-ui.com/components/hidden/

Only the import was from 'recompose/compose' not 'docs/src/modules/utils/compose' (I have tried this too)

But don't work anymore maybe because of Remove recompose dependency (#14479)

What is the alternative of that?

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process. labels May 30, 2019
@oliviertassinari
Copy link
Member

@Bouncue Nice finding. We can migrate the demo to use the style hook API, it will remove the need to import a private module of the documentation.
https://github.com/mui-org/material-ui/blob/b3cace62fac1e0edd9b81b169fa731ebd738bf41/docs/src/pages/components/hidden/GridIntegration.js#L9

Do you want to work on it? :)

@Bouncue
Copy link
Author

Bouncue commented May 31, 2019

I am afraid I can't, I don't know about hook API. what I know is just copy and paste the code from doc

@merceyz
Copy link
Member

merceyz commented May 31, 2019

@oliviertassinari I looked into this yesterday but didn't finish as there is no hook version of withWidth yet. Should we just continue using the HOC version of withWidth for now?

@oliviertassinari
Copy link
Member

@merceyz We are using compose to handle two HOCs, we don't need this helper function with a single HOC. We can remove it by migrating withStyles to makeStyles.

@merceyz
Copy link
Member

merceyz commented May 31, 2019

Yeah, just asking if I should convert it to hooks now with withWidth as a HOC, or wait for a hook version of withWidth

@oliviertassinari
Copy link
Member

@merceyz Removing compose would provide value on its own. I don't think that we should wait for #15678.

@merceyz
Copy link
Member

merceyz commented May 31, 2019

@oliviertassinari Alright, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants