You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a case that I want to pass an already started unleash client to the unleash flag provider. When I do that, flagsReady (returned from useFlagsStatus hook) returns false even though the client is started and ready.
As far as I see, this behaviour is this way due to calling the readyCallback only when we get the ready event from the client. In my case, this event is never sent since the client is already ready before the flag provider component is initialized:
I wonder if this is intentional and whether the case I mentioned is an intended way of using unleash client or not. Happy to contribute if it is decided to be an actual bug - but I might still need some pointers.
Describe the bug
I have a case that I want to pass an already started unleash client to the unleash flag provider. When I do that,
flagsReady
(returned fromuseFlagsStatus
hook) returnsfalse
even though the client is started and ready.Here is a reproducible example: https://stackblitz.com/edit/vitejs-vite-elpthg?file=src%2FApp.tsx.
As far as I see, this behaviour is this way due to calling the
readyCallback
only when we get theready
event from the client. In my case, this event is never sent since the client is already ready before the flag provider component is initialized:proxy-client-react/src/FlagProvider.tsx
Line 77 in 4656873
I wonder if this is intentional and whether the case I mentioned is an intended way of using unleash client or not. Happy to contribute if it is decided to be an actual bug - but I might still need some pointers.
SDK information (language and version)
[email protected]
and@unleash/[email protected]
The text was updated successfully, but these errors were encountered: