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

[docs] Document sharing makeStyles between components #15234

Merged
merged 4 commits into from
Apr 8, 2019

Conversation

johnraz
Copy link
Contributor

@johnraz johnraz commented Apr 6, 2019

Closes #15214

@johnraz
Copy link
Contributor Author

johnraz commented Apr 6, 2019

@oliviertassinari please give it a look and see if it all make sense, thx!

@mui-pr-bot
Copy link

mui-pr-bot commented Apr 6, 2019

No bundle size changes comparing bd7f1e7...941434b

Generated by 🚫 dangerJS against 941434b

@joshwooding joshwooding changed the title Fix #15214 Doc about CSS ordering and makeStyles [docs] Document makeStyles injection between two components Apr 6, 2019
@joshwooding joshwooding added the docs Improvements or additions to the documentation label Apr 6, 2019
@joshwooding joshwooding changed the title [docs] Document makeStyles injection between two components [docs] Document sharing makeStyles between components Apr 6, 2019
@oliviertassinari
Copy link
Member

I had in mind something less practical but more generic around how the relative specificity works.

Co-Authored-By: johnraz <[email protected]>
@johnraz
Copy link
Contributor Author

johnraz commented Apr 7, 2019

I will read the source code to understand what exactly is going on and I’ll try to improve this.

@johnraz
Copy link
Contributor Author

johnraz commented Apr 7, 2019

@oliviertassinari : would it be right to assimilate this doc about withStyles with makeStyles's behavior?

What I get from the doc above is that withStyles calling order defines the injection order.
I'm not 100% sure how an HOC and a hook compare in term of "precedence" here.
Is it right to say that the makeStyles calling order will define the injection order?

Sorry if that seems obvious but I'd better be safe than sorry here 😉

@oliviertassinari
Copy link
Member

oliviertassinari commented Apr 7, 2019

@johnraz I'm proposing an alternative wording, it's more generic. You shouldn't have to create a new makeStyle in each file. Imports should be working. Thanks for the JSS link, it was helpful.

@johnraz
Copy link
Contributor Author

johnraz commented Apr 7, 2019

This is perfect! It actually answered the last doubts I had about how it works 👍🏻 Thanks for the welcoming exchange btw!

@oliviertassinari
Copy link
Member

oliviertassinari commented Apr 7, 2019

@johnraz Great :). Could you accept the @joshwooding's suggestions you agree with? Thanks.

Co-Authored-By: johnraz <[email protected]>
@johnraz
Copy link
Contributor Author

johnraz commented Apr 7, 2019

@oliviertassinari sure thing, I was on my phone before, needed the laptop to do it properly ;-)

@oliviertassinari
Copy link
Member

@johnraz Thank you for the care in the problem.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants