File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1010 "@types/node" : " ^16.18.18" ,
1111 "@types/react" : " ^18.0.28" ,
1212 "@types/react-dom" : " ^18.0.11" ,
13- "launchdarkly-react-client-sdk" : " ^3.0.4 " ,
13+ "launchdarkly-react-client-sdk" : " ^3.0.8 " ,
1414 "react" : " ^18.2.0" ,
1515 "react-dom" : " ^18.2.0" ,
1616 "react-scripts" : " 5.0.1" ,
Original file line number Diff line number Diff line change @@ -3,13 +3,19 @@ import ReactDOM from 'react-dom/client';
33import './index.css' ;
44import App from './App' ;
55import reportWebVitals from './reportWebVitals' ;
6- import { asyncWithLDProvider } from 'launchdarkly-react-client-sdk' ;
6+ import { asyncWithLDProvider , LDContext } from 'launchdarkly-react-client-sdk' ;
77
88( async ( ) => {
99 // Set clientSideID to your own Client-side ID. You can find this in
1010 // your LaunchDarkly portal under Account settings / Projects
11+ const context : LDContext = {
12+ kind : 'user' ,
13+ key : 'test-user-1' ,
14+ } ;
15+
1116 const LDProvider = await asyncWithLDProvider ( {
12- clientSideID : process . env . REACT_APP_LD_CLIENT_SIDE_ID ?? '' ,
17+ clientSideID : process . env . REACT_APP_LD_CLIENT_SIDE_ID ?? '59b2b2596d1a250b1c78baa4' ,
18+ context,
1319 } ) ;
1420
1521 const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) as HTMLElement ) ;
Original file line number Diff line number Diff line change @@ -146,3 +146,5 @@ export interface AllFlagsLDClient {
146146export interface LDFlagKeyMap {
147147 [ camelCasedKey : string ] : string ;
148148}
149+
150+ export * from 'launchdarkly-js-client-sdk' ;
You can’t perform that action at this time.
0 commit comments