getServerSideProps and depdendency graphs #17076
Unanswered
anton-johansson
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I recently got into next.js and love it so far. I usually build my applications in an object-oriented manner and I end up with some kind of dependency graph. For example (without IOC/DI frameworks to showcase the example):
Now, if I want to use any of these services in a
getServerSideProps
function, I'd have to do some kind of static accessor for these, which is something that I usually try to avoid. Does anyone have any suggestions or ideas on how I can do this in a smart way?Beta Was this translation helpful? Give feedback.
All reactions