default export

This commit is contained in:
Roman Shtylman 2022-01-24 12:01:22 -08:00
parent 68dba9705f
commit 9a8a6e9e19

View File

@ -97,7 +97,7 @@ interface Props extends CircularPropsPassedThroughJSONNestedNode {
expandable: boolean;
}
function JSONNestedNode(props: Props) {
export default function JSONNestedNode(props: Props) {
const {
getItemString,
nodeTypeIndicator,
@ -126,8 +126,6 @@ function JSONNestedNode(props: Props) {
});
}, [isCircular, data, keyPath, level, shouldExpandNode]);
// fixme - previously this was happening after a component should update
// this should be moved to a useMemo and updated only when some props change
const renderedChildren =
expanded || (hideRoot && props.level === 0)
? renderChildNodes({ ...props, level: props.level + 1 })