Skip to content

Commit

Permalink
feat: [FFM-10886]: Update JS SDK to 1.26.0 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
knagurski authored Mar 6, 2024
1 parent ed93075 commit 37b1533
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 14 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,43 @@ interface AsyncStorage {
}
```

## 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

### `FFContextProvider`
Expand Down
6 changes: 3 additions & 3 deletions examples/get-started/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@harnessio/ff-react-client-sdk",
"version": "1.9.0",
"version": "1.10.0",
"author": "Harness",
"license": "Apache-2.0",
"module": "dist/esm/index.js",
Expand All @@ -21,7 +21,7 @@
"react": ">=16.7.0"
},
"dependencies": {
"@harnessio/ff-javascript-client-sdk": "^1.25.0",
"@harnessio/ff-javascript-client-sdk": "^1.26.0",
"lodash.omit": "^4.5.0"
},
"devDependencies": {
Expand Down

0 comments on commit 37b1533

Please sign in to comment.