aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@concordance/react/README.md
blob: baf16efcfb2e3a80213e222395e14b5fa8a0d8ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# @concordance/react

React plugin for [Concordance](https://github.com/concordancejs/concordance).

Allows
[`React.createElement()`](https://facebook.github.io/react/docs/react-api.html#createelement)
objects to be compared, formatted, diffed and serialized. Also supports
`toJSON()` renderings of
[`react-test-renderer`](https://www.npmjs.com/package/react-test-renderer).
These may be compared to `React.createElement()` objects.

When comparing [React
component](https://facebook.github.io/react/docs/components-and-props.html)
elements, the element type is compared by identity. After deserialization the
element types are compared by function name, taking into account whether
serialization and / or comparison is done using Node.js 4, which has less
reliable support for function names.

Component elements are formatted with a ⍟ character after the element
name. Properties and children are formatted by [Concordance](https://github.com/concordancejs/concordance).