Ebin Thomas
Ebin Thomas

Reputation: 21

Error while adding launchDarkly in react app

I was trying to add a feature flag using launchDarkly. I installed launchdarkly-react-client-sdk using yarn("launchdarkly-react-client-sdk": "^3.2.0",). I tried to add launchDarkly provider(withLDProvider) to one of my main container componnet(not root component).

while running the application. getting below error

"export 'withLDProvider' was not found in 'launchdarkly-react-client-sdk'

anybody know what I am missing?

import React from 'react'
import { withLDProvider } from 'launchdarkly-react-client-sdk';

export const Mycomponent = ({ }) => {
  return (
    ......
  )
}

export default withLDProvider({
  clientSideID: 'client-id',
  user: {
    key: "user_key",
    name: "ebin",
    email: "[email protected]",
  },
})(Mycomponent)

Upvotes: 0

Views: 184

Answers (0)

Related Questions