HomeToolsAbout

Circular Dependencies

What is it

project/controllers/account --> project/shared/calc ^ | project/components/menu <------------

How to Avoid Circular Dependency

Try to keep your import dependency shallow.

When the dependency graph becomes deeper (i.e package x imports y, y imports z, z imports x) then circular dependencies become more likely.

Sometimes code repetition is not a bad idea, which is exactly opposite of DRY (don't repeat yourself).

AboutContact