Compare, format, diff and serialize React trees with Concordance
npm install @concordance/reactReact plugin for Concordance.
AllowsReact.createElement()
objects to be compared, formatted, diffed and serialized. Also supportstoJSON() renderings ofreact-test-renderer.
These may be compared to React.createElement() objects.
When comparing React
component
elements, the element type is compared by identity. After deserialization the
element types are compared by function name.
Component elements are formatted with a ⍟ character after the element
name. Properties and children are formatted by Concordance.