How to allow a react application to select from a list of tenants to log into

I am building an application that allows users to choose from a list of tenants in a SPA using react states which are mapped to corresponding domains and clientIDs. However, even after confirming that the correct domain and clientID has been selected, it seems like the tag only uses the domain and clientID of the tenant that corresponds with the default state. This makes it as if the user never selected a different tenant from the list upon loading into the SPA. Any workarounds for this?