How can I store a request context without passing a ctx param down the function stack?

Stack overflow: Have you tried using React.js?

  • 0
    You could make the functions dealing with the context methods of an object wich stores the context in a local field.
    You could also have multiple objects dealing with contexts and pass the context to them on construction/initialization.
  • 0
    Transient scope dependency injection.
    Also currying
    Also service locator
    Also the last one is not recommended
  • 0
    You forgot the answer below it on -5 which tells you to use global variables then gives an example in a different language
Add Comment