How to fix nasty circular dependency issues once and for all in JavaScript & TypeScript
Michel Weststrate
1.1K12

What about using lazy loading to solve circular dependencies. By lazy loading I mean using thunks and putting require statements inside a function which isn’t called during initial module loading time. In your experience, what do you think about using lazy loading as a pattern to fix circular dependencies?