Has anyone else come across a need to update environment variables? For example, I have an apiService: ServiceType
that is responsible for making all of my network calls. Pre-TCA, I had a login
function that would accept a sessionToken, which would then be sent along with each request.
Since the Environment is passed into each reducer as a constant, I don't think it's possible to keep doing that. I'm curious if this is a challenge that anyone else has run into or if I need to change my thinking with this architecture.
One option would be to keep the sessionToken in one of the reducer's states and then pass that along with each request, but that would be a bit tedious and it feels like there is a better way. I just haven't found it yet.