Forum Discussion
lazycipher
Feb 25, 2021Copper Contributor
Detection of whether react app is running in Teams or Web browser?
Currently, I'm trying to get context using getContext() and trying to decide whether it's running in Teams or Browser. Is there any other better way to move ahead with this?
lazycipher
Feb 28, 2021Copper Contributor
Actually, the callback inside getContext() is not being executed when the website is being opened in the browser. Please see this once -> https://stackblitz.com/edit/react-cuadoi?file=src%2FApp.js
Nikitha-MSFT
Mar 01, 2021Former Employee
Where did you assign the value to the teamscontext variable? Could you please try printing the context directly using console and check in dev dev tools?