redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

Circular dependency in react-json-tree

Open BryceMehring opened this issue 6 months ago • 1 comments

When using the react-json-tree in rollup I am getting the following warning regarding circular dependencies:

(!) Circular dependency
../node_modules/react-json-tree/lib/esm/JSONNode.js -> ../node_modules/react-json-tree/lib/esm/JSONObjectNode.js -> ../node_modules/react-json-tree/lib/esm/JSONNestedNode.js -> ../node_modules/react-json-tree/lib/esm/JSONNode.js

The modules should be refactored to avoid this circular dependency.

BryceMehring avatar May 22 '25 19:05 BryceMehring

Is there a practical reason why circular dependencies are problematic? JSON's structure is a nested hierarchy, so it seems natural that the React components required to render the tree will need to be circular. The only solution I can think of would be to put it all in one module, but I'm not sure that's preferable.

Methuselah96 avatar May 22 '25 19:05 Methuselah96