Hi, it is possible to have several `contexts` (set...
# gd-beginners
j
Hi, it is possible to have several
contexts
(setContext with
TigerTokenAuthProvider
) for web components dashboards? I need render more dashboards in one app, each dashboard have unique token. Now first dashboard loads perfectly but next one (on next page) fail, because it not uses "new" token.
I will explore react lib instead of web component maybe.
r
Hi there Jakube, the React SDK is definitely a much better way to go for this, especially if your app is already running React 🙂 You get a lot more flexibility that way! Can you share a little more about your use-case though? I would assume that if you're loading multiple dashboards for a user, the dashboards would be coming from the same workspace, no?
j
We went for web-components because the react versions was not compatible .. but I see the React SDK not support React 18 so I can give it another change.
About the use case, I am not sure why, but now we use our internal telemetry api which return "userToken", "dashboard id" and "workspace id" we have to render. Token and workspace are unique for every page view. So I am trying to figure out how to never cache/reuse the context.
r
Hi Jakube, I'm very sorry, this one seems to have slipped between the cracks a bit! Have you had any more luck with this using React? 🙂
j
But we temporary use 876.css from the backend. So it somehow works.
r
Yeah, the path is essentially set up per backend, so as long as the backend is the same, the path should too - but it does come with the same warnings as the rest of non-standard CSS workflows, there may be unexpected changes!