If you do SSR for your React Application using React v15, you need to use
renderToString to generate a markup to use it on browser. In addition to that, If you’d like to generate entirely HTML of a page with React, you need to use
renderToStaticMarkup and combine them like…
This post is written about how to test React Components with React Test Renderer v16.
React Test Renderer is a renderer for testing React Components, which traverses a ReactElement tree and represents as a JSON object.