Files
codeql-action/node_modules/@concordance/react/README.md
T

19 lines
841 B
Markdown
Raw Normal View History

2020-05-04 18:50:13 +01:00
# @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.
Component elements are formatted with a ⍟ character after the element
name. Properties and children are formatted by [Concordance](https://github.com/concordancejs/concordance).