reactql icon indicating copy to clipboard operation
reactql copied to clipboard

Load global style on demand

Open dmitry opened this issue 5 years ago • 0 comments

I'd like to show GraphiQL with it's global styles. At the moment there are just one main.css file in ReactQL and it contains all the global styles (even if you are not loaded this component with it's style). How to load ~graphiql/graphiql.css only when the graphiql component is loaded, on demand?

Another use case could be: load component with it's global style when changing context to logged in state, to split auth/unauth route components. But it's additionally takes into account not just CSS, but also components itself.

dmitry avatar Jan 30 '19 21:01 dmitry