isomorphic-style-loader
isomorphic-style-loader copied to clipboard
Can't use isomorphic-style-loader with functional Components?
Hi, I'm using isomorphic-style-loader in my application and now I tried using a functional component with it but it returns me a React class component. So, later in my app (in some component which expects a functional component to render), react throws me an error saying that it expected a functional component and got a class. Is there any way where I can use withStyles on functional components? Thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Yes, Higher order components work with functional components. It shouldn't be an issue.
you need to export withStyles(styles)(ComponentName)