OnrampLab / next-starter

A starter project for Next.js with TypeScript
next-starter-eight-iota.vercel.app
MIT License
3 stars 1 forks source link

DI pattern switch to use inversify #123

Closed TianyiLi closed 2 years ago

TianyiLi commented 2 years ago

DI pattern has a big issue when doing the code splitting.

It needs to know the abstract type and service / value then do the injection But, it is not friendly to code-splitting, even though using the dynamic import.

current solution is new everything and does nothing for inject service. each class also has init method to do the inject service initialize

try to-