NestJS · Senior · Question 9 of 75
Why can forwardRef hide a design problem even when it fixes the error?
- 1
forwardRefdisables DI for those providers - ✓Correct answer: A module or provider cycle means two parts depend on each other's internals; it complicates initialization order and testing
- 3
forwardRefmakes the app slower on every request
Explanation
Typical fixes: extract shared logic into a third module, invert the dependency with events, or depend on an abstraction.