Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
SDK Version
3.0.0
Current Behavior
When following the instructions for implementing the React SDK for feature flags, I get this error in the JS console:
ReactSDK: Error initializing client. The core client or user promise(s) rejected.
Expected Behavior
No error is encountered when initializing the Optimizely React SDK.
Steps To Reproduce
import { createInstance, OptimizelyProvider } from "@optimizely/react-sdk";
const App = () => (
<OptimizelyProvider
optimizely={createInstance({ sdkKey: "<key>" })}
user={{ id: "12345" }}
>
<Children />
</OptimizelyProvider>
);
...then, in a child component:
const [isEnabled] = useFeature("<feature key>");
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
Minor issue
Workaround/Solution
No, but the SDK seems to still work despite this error, so I suppose I could ignore it?
Recent Change
This is a brand new integrations, so no.
Conflicts
No response