DEV Community

A dive into testing Styled Components and React HOCs

Alex Escalante on August 24, 2017

For my latest project, it made sense to use the very nice CSS in JS solution called styled-components, along with snapshot testing, which is a wa...
Collapse
 
alex_escalante profile image
Alex Escalante

I just added a note on generalizing the diving using recursion.

Collapse
 
breeny profile image
Andrew Breen πŸ‘¨β€πŸ’»

Potential enhancement to the dd function as well would be a graceful failure (I'm sure someone at some point would be confused as to why w is undefined in a recursive function).

Really interesting solution though, love it!

Collapse
 
alex_escalante profile image
Alex Escalante

You're very right!