Fork me on GitHub

What is the best way to deal with this situation: I have 2 components A and B , they both need to import each other, so this results in a Cyclic load dependency error. How can I fix this without having to nest these components?


If they both use each other then you have several options: • Merge the two components into one component. • Extract the shared functionality into a third component that can be used by both A and B. • Divide the functionality differently between A and B so that only e.g. A depends on B but not the other way around. What is best differs from case to case, so good luck with the redesign!

🙏 3

Another option would be to split your interface.clj into several ones (`interface/*.clj`) in a way you avoid the cyclic dependency

🙏 3

@U1G0HH87L @U0CL38MU1 Thank you guys, for the suggestions . I think i will try to merge both components, or split interface.

👍 7