React component testing has dramatically improved over the past year. A year ago I wrote a small post that used Enzyme which helped supply much needed tooling around react component testing and isolated component testing with shallow Rendering.

I started my developing adventures in javascript and front end development a little over two years ago, and before javascript I enjoyed scripting with python. While using both of these languages I've benefited tremendously from open source technologies, specifically GDAL with python and react with redux.

Over the past few months I've been using a library called recompose. It claims to be a react utility belt for function components and higher-order components, and it fulfills this claim exceedingly well!

I've previously talked about stateless functional components and how they have helped keep components small and more reusable. Functional components really shine with the help of recompose! I've been able to extract computed properties, display logic, and overall optimize my code and views!

With react v0.13 they introduced 'shallow rendering', all basic html inside a component is rendered and no sub components are rendered. We now have the power to run unit tests in node without the need for a 'DOM'.

Shallow Rendering takes a component and renders it 'one level deep' and will not render sub components. This allows unit tests to keep focus on their specific component.