Multiple withStyles only rendering the first
See original GitHub issueI asked this on Gitter originally, but I’m struggling to get the following to work (example):
import appStyles from './App.scss`;
import otherStyles from '../OtherComponent/otherStyles.scss';
...
export default withStyles(App, appStyles, otherStyles);
This doesn’t throw any errors, and both the styles are within the styles
array, only the appStyles
are loaded in.
Is this the correct way of going about this?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Material UI withStyles on multiple styled HoCs - Stack Overflow
My application uses HoCs for its modals and I use withStyles to style them, when I apply multiple HoCs to one component however...
Read more >Pages render without styles for a brief second #15642 - GitHub
Bug report Describe the bug Pages render without any styles for a brief second before the CSS is loaded: This only happens in...
Read more >JSS integration with React
Static properties being rendered first so that function values will have higher source order specificity. import React from 'react' import withStyles from ...
Read more >Rendering Elements - React
Applications built with just React usually have a single root DOM node. ... To render a React element, first pass the DOM element...
Read more >Advanced (LEGACY) - MUI System
The makeStyles (hook generator) and withStyles (HOC) APIs allow the creation of multiple style rules per style sheet. Each style rule has its...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess, we need to create
<StylesContext>
(or<StylesProvider>
) React component, that can be used to setinsertCss
context variable…Your context insertCss function should handle all style arguments rather than just one, for example: