Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Converting some more stuff to functions. In the same way as
XYFrame
, Ordinal and Network frames were pretty easy to move to function components, by using previously implementeduseDerivedStateFromProps
anduseLegacyUnmountCallback
. I used the old docs and examples to test the changes, at least to ensure I'm not breaking anything. Couple of small details regarding this PR:NetworkFrame
there were some unused props (likeonNodeOut
) that I removed from both the component and related typingsOrdinalFrame
there were possibly incorrect default props values foroScaleType: scaleBand
andrScaleType: scaleLinear
which TS pointed to. So I changed the values tooScaleType: scaleBand()
andrScaleType: scaleLinear()
(note the parentheses) and the type error's gone.After this PR is merged, only two components are left to be converted:
InteractionLayer
andVisualizationLayer
. Those are slightly harder to work with. I think I'll be able to finish my work on #601 first and then continue with the layers conversion.