After changing the context via updateContext, a new request for toggles doesn't trigger immediately. This looks like it's because the first fetchToggles and/or ready promise hasn't returned in start yet and timerRef isn't set.
Additionally, this means .start can be called multiple times until any chain of promises resolve.
Steps to reproduce the bug
Start a client.
Update the context after.
Observe no request for toggles with the latest context.
Expected behavior
When calling updateContext, a new request for fetchToggles should occur immediately if start has already been called.
Logs, error output, etc.
No response
Screenshots
No response
Additional context
Using @unleash/proxy-client-react and we are changing the context in a child component.
Describe the bug
After changing the context via updateContext, a new request for toggles doesn't trigger immediately. This looks like it's because the first fetchToggles and/or ready promise hasn't returned in
start
yet and timerRef isn't set.Additionally, this means .start can be called multiple times until any chain of promises resolve.
Steps to reproduce the bug
Expected behavior
When calling
updateContext
, a new request for fetchToggles should occur immediately ifstart
has already been called.Logs, error output, etc.
No response
Screenshots
No response
Additional context
Using @unleash/proxy-client-react and we are changing the context in a child component.
Unleash version
4.17.2
Subscription type
Pro
Hosting type
Hosted by Unleash
SDK information (language and version)
No response