Tech
Request Scoped Context – How I Stopped Passing Arguments Everywhere
In my past two backend projects, I use to pass info about user manually. I thought this is the right method. Every time some function need info, I pass it as parameter. Simple. Direct. Clean enough.
Then I started building a cloth rent booking app.
In start everything was fine. I had orderId coming in with the request. I pass it to my booking service. Service pass it to availability checker. I thought — this is clean approach. I feel good about the code.
Then the app start getting mo...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to