Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

material-ui-typescript-react-lazyload

When lazy loading Material-UI compoents with custom styles if we just extend our interfae like so: export interface NotWorkingProps extends WithStyles<typeof styles> webpack will not build it and you'll get an error.

There is a trick to fix this by creating an inner interface that extends both the exported interface and the With Styles<typeof styles> interface.

Lazy load function is inspired by Lyft's Universal Lazy Load Component

About

Trying to lazy load a component that uses custom material ui styles causes issues, here's a solution.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages