Skip to content

Commit fe54aaa

Browse files
committed
Merge remote-tracking branch 'pub/main'
2 parents b6393cf + 507ad67 commit fe54aaa

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to the LaunchDarkly Client-side SDK for React will be documented in this file. For the source code for versions 2.13.0 and earlier, see the corresponding tags in the [js-client-sdk](https://github.com/launchdarkly/js-client-sdk) repository; this code was previously in a monorepo package there. See also the [JavaScript SDK changelog](https://github.com/launchdarkly/js-client-sdk/blob/main/CHANGELOG.md), since the React SDK inherits all of the underlying functionality of the JavaScript SDK; this file covers only changes that are specific to the React interface. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [2.27.0] - 2022-08-31
6+
### Added:
7+
- `useFlags` hook is now generically typed, allowing you to assert what type your flag set will be.
8+
- `useLDClientError` hook for exposing client initialization failures.
9+
10+
### Changed:
11+
- `sendEventsOnlyForVariation` is now set to `true` by default to prevent a flag evaluation event being generated for every flag on load.
12+
- `flags` object (that is either injected via props using `LDConsumer` or returned from the `useFlags` hook) will generate a flag evaluation event on flag read (using a JavaScript proxy). This can be disabled by setting `reactOptions.sendEventsOnFlagRead: false`.
13+
- upgraded from ES5 to ES6.
14+
515
## [2.26.0] - 2022-04-27
616
### Added:
717
- `LDOptions.application`, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.

examples/async-provider/src/client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import App from '../universal/app';
77
(async () => {
88
// Set clientSideID to your own Client-side ID. You can find this in
99
// your LaunchDarkly portal under Account settings / Projects
10-
const LDProvider = await asyncWithLDProvider({ clientSideID: 'YOUR_CLIENT_SIDE_ID_HERE' });
10+
const LDProvider = await asyncWithLDProvider({ clientSideID: '' });
1111

1212
render(
1313
<BrowserRouter>

examples/hoc/src/universal/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ const App = () => (
2222

2323
// Set clientSideID to your own Client-side ID. You can find this in
2424
// your LaunchDarkly portal under Account settings / Projects
25-
export default withLDProvider({ clientSideID: 'YOUR_CLIENT_SIDE_ID_HERE' })(App);
25+
export default withLDProvider({ clientSideID: '' })(App);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "launchdarkly-react-client-sdk",
3-
"version": "2.26.0",
3+
"version": "2.27.0",
44
"description": "LaunchDarkly SDK for React",
55
"author": "LaunchDarkly <[email protected]>",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)