-
Notifications
You must be signed in to change notification settings - Fork 37
[BUG] ReactSDKClient setUser() is not working #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've added an internal ticket FSSDK-9985 into our next sprint. |
I realise that the equivalent of a "+1" comment isn't necessarily helpful, but this bug has cost two separate colleagues of mine two different afternoons trying to debug configuration. We have exactly the same issue as reported by @ricky-harrys. If the ticket opened is internal, a status update would be helpful, or an |
Thanks for hanging in there as we align fixes for both the React and underlying JS SDKs. I've notified my manager that we need to look at both this and #235. Sorry about the low update counts here to keep you all apprised. I will get updates and movement for you all shortly. |
I'm moving a patch to the JS SDK out, then updating the dep along with fixes for this issue. I should have a release out early-mid next week. |
We've released v3.1.0 of the React SDK. When you have a moment, please let me know how this looks in a QA/Staging scenario. |
I think this one should be solved. I just noticed some modifications that I'd suggest in the provided example: const optimizelyClient = createInstance({
sdkKey: "<key>",
});
const App = () => {
//optimizelyClient.setUser({ id: "12345" });
return (
<OptimizelyProvider optimizely={optimizelyClient} user={{ id: "12345" }}>
<Children />
</OptimizelyProvider>
);
}
|
Feel free to update here if needed. |
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
SDK Version
3.0.0
Current Behavior
When attempting to set the user ID on the Optimizely ReactSDK client using
setUser()
I see the following error when implementing a feature flag:Expected Behavior
Setting a user ID using
setUser()
should set the usr ID on the client.Steps To Reproduce
...then, in a child component:
React Framework
React 18.2.0 (Create React App + react-app-rewired)
Browsers impacted
Reproducible in both Chrome and Safari. No other browsers were tested. The issue does not seem to be browser-specific.
Link
No response
Logs
Severity
No response
Workaround/Solution
I'm forced to abandon this approach and have to set the user ID via the
user
prop in<OptimizelyProvider>
.Recent Change
No
Conflicts
No response
The text was updated successfully, but these errors were encountered: