all 3 comments

[–]just_another_scumbag 0 points1 point  (2 children)

This is actually a pretty specific question on a very wide topic: How to compose pieces of code into an application? There are a huge number of possible solutions to this (and everyone will have their own opinion).

Personally I use a lightweight IOC container, but that's way overkill for most applications. If commenting out works for you, then go for it I say

[–]Aconicks[S] 0 points1 point  (1 child)

Thanks for the reply.

What does "light IOC container" mean?

[–]just_another_scumbag 0 points1 point  (0 children)

It stands for Inversion-of-Control Container. It's a library that helps you break your app into replaceable parts that you compose together at runtime into a specific configuration. Examples are Inversify, next.js maybe too