'Comparison of server and client React component trees?

Good day, everyone!

In our project we are using React with SSR. I'm trying to resolve a problem that is supposedly connected to hydration error and the first idea was to compare server and client React component trees.

Alas, it seems like react-test-renderer does mount components, which fails in SSR. Are there any other tools or maybe any approaches except gradual deletion of components to detect the one that fails?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source