v1.0.0
This is a new major version with breaking changes.
Breaking Changes
This version of ditto-react
only works with output data generated by the Ditto CLI v2 or greater.
Other Changes
- We've made some stabilization improvements to the way that missing/invalid
frameId
,blockId
,textId
, orcomponentId
values are handled:
- If an invalid
frameId
orblockId
is specified for the<Ditto />
,<DittoFrame />
, or<DittoBlock />
components, thechildren
render prop will never be called; instead, an empty fragment will be returned for the component and an error will be logged to the console. This is a quality of life improvement that significantly reduces the amount of data validation that needs to be done in logic that uses frames or blocks.- If
frameId
orblockId
props are used in conjuction with theflat
orstructured
formats, a specific error message will be logged to the console indicating that the default format needs to be used instead.
- We implemented generalized refactoring of
ditto-react
that is enabled by the improvements made in the most recent version of the CLI; a lot of the complexity in determining the how the data should be parsed was removed.