@harnessio/ff-react-client-sdk
Advanced tools
Comparing version 1.9.0 to 1.10.0
{ | ||
"name": "@harnessio/ff-react-client-sdk", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"author": "Harness", | ||
@@ -24,3 +24,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@harnessio/ff-javascript-client-sdk": "^1.25.0", | ||
"@harnessio/ff-javascript-client-sdk": "^1.26.0", | ||
"lodash.omit": "^4.5.0" | ||
@@ -27,0 +27,0 @@ }, |
@@ -155,2 +155,39 @@ # React.js Client SDK For Harness Feature Flags | ||
## Overriding the internal logger | ||
By default, the React Client SDK will log errors and debug messages using the `console` object. In some cases, it | ||
can be useful to instead log to a service or silently fail without logging errors. | ||
```typescript jsx | ||
const myLogger = { | ||
debug: (...data) => { | ||
// do something with the logged debug message | ||
}, | ||
info: (...data) => { | ||
// do something with the logged info message | ||
}, | ||
error: (...data) => { | ||
// do something with the logged error message | ||
}, | ||
warn: (...data) => { | ||
// do something with the logged warning message | ||
} | ||
} | ||
return ( | ||
<FFContextProvider | ||
apiKey="YOUR_API_KEY" | ||
target={{ | ||
identifier: 'reactclientsdk', | ||
name: 'ReactClientSDK' | ||
}} | ||
options={{ | ||
logger: myLogger | ||
}} | ||
> | ||
<MyApp /> | ||
</FFContextProvider> | ||
) | ||
``` | ||
## API | ||
@@ -157,0 +194,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56580
540