Skip to content

Commit 187cd0e

Browse files
prepare 2.23.2 release (#98)
1 parent 4275608 commit 187cd0e

6 files changed

+16
-14
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to the LaunchDarkly Client-side SDK for React
22

3-
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
3+
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/sdk/concepts/contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
44

55
## Submitting bug reports and feature requests
66

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## LaunchDarkly overview
66

7-
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/docs/getting-started) using LaunchDarkly today!
7+
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
88

99
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
1010

@@ -16,7 +16,7 @@ Additionally, refer to the [JavaScript SDK README](https://github.com/launchdark
1616

1717
## Getting started
1818

19-
Refer to the [SDK documentation](https://docs.launchdarkly.com/docs/react-sdk-reference#section-getting-started) for instructions on getting started with using the SDK.
19+
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/react/react-web#getting-started) for instructions on getting started with using the SDK.
2020

2121
Please note that the React SDK has two special requirements in terms of your LaunchDarkly environment. First, in terms of the credentials for your environment that appear on your [Account Settings](https://app.launchdarkly.com/settings/projects) dashboard, the React SDK uses the "Client-side ID"-- not the "SDK key" or the "Mobile key". Second, for any feature flag that you will be using in React code, you must check the "Make this flag available to client-side SDKs" box on that flag's Settings page.
2222

@@ -41,7 +41,7 @@ We encourage pull requests and other contributions from the community. Check out
4141
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
4242
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
4343
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
44-
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
44+
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
4545
* Explore LaunchDarkly
4646
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
4747
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides

src/context.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface LDContext {
1515
* An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`).
1616
* This will be be undefined initially until initialization is complete.
1717
*
18-
* @see http://docs.launchdarkly.com/docs/js-sdk-reference
18+
* @see https://docs.launchdarkly.com/sdk/client-side/javascript
1919
*/
2020
ldClient?: LDClient;
2121
}

src/types.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export interface LDReactOptions {
1616
* This is true by default, meaning that keys will automatically be converted to camel-case.
1717
*
1818
* For more information, see the React SDK Reference Guide on
19-
* [flag keys](https://docs.launchdarkly.com/docs/react-sdk-reference#section-flag-keys).
19+
* [flag keys](https://docs.launchdarkly.com/sdk/client-side/react/react-web#flag-keys).
2020
*
21-
* @see https://docs.launchdarkly.com/docs/react-sdk-reference#section-flag-keys
21+
* @see https://docs.launchdarkly.com/sdk/client-side/react/react-web#flag-keys
2222
*/
2323
useCamelCaseFlagKeys?: boolean;
2424
}
@@ -43,7 +43,7 @@ export interface ProviderConfig {
4343
* A LaunchDarkly user object. If unspecified, a new user with a
4444
* random key will be created and used. This user's key will remain constant across browser sessions.
4545
*
46-
* @see http://docs.launchdarkly.com/docs/js-sdk-reference#section-users
46+
* @see https://docs.launchdarkly.com/sdk/features/user-config#javascript
4747
*/
4848
user?: LDUser;
4949

@@ -55,7 +55,7 @@ export interface ProviderConfig {
5555
/**
5656
* LaunchDarkly initialization options. These options are common between LaunchDarkly's JavaScript and React SDKs.
5757
*
58-
* @see https://docs.launchdarkly.com/docs/js-sdk-reference#section-customizing-your-client
58+
* @see https://docs.launchdarkly.com/sdk/features/config#javascript
5959
*/
6060
options?: LDOptions;
6161

@@ -98,7 +98,7 @@ export interface AllFlagsLDClient {
9898
/**
9999
* An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`).
100100
*
101-
* @see http://docs.launchdarkly.com/docs/js-sdk-reference
101+
* @see https://docs.launchdarkly.com/sdk/client-side/javascript
102102
*/
103103
ldClient: LDClient;
104104
}

src/withLDConsumer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface LDProps {
2626
/**
2727
* An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`)
2828
*
29-
* @see http://docs.launchdarkly.com/docs/js-sdk-reference
29+
* @see https://docs.launchdarkly.com/sdk/client-side/javascript
3030
*/
3131
ldClient?: LDClient;
3232
}

src/withLDProvider.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ import hoistNonReactStatics from 'hoist-non-react-statics';
2323
* @param config - The configuration used to initialize LaunchDarkly's JS SDK
2424
* @return A function which accepts your root React component and returns a HOC
2525
*/
26-
export function withLDProvider(config: ProviderConfig): (WrappedComponent: React.ComponentType) => React.ComponentType {
27-
return function withLDProviderHoc(WrappedComponent: React.ComponentType): React.ComponentType {
26+
export function withLDProvider<T = {}>(
27+
config: ProviderConfig,
28+
): (WrappedComponent: React.ComponentType<T>) => React.ComponentType<T> {
29+
return function withLDProviderHoc(WrappedComponent: React.ComponentType<T>): React.ComponentType<T> {
2830
const { reactOptions: userReactOptions } = config;
2931
const reactOptions = { ...defaultReactOptions, ...userReactOptions };
3032
const providerProps = { ...config, reactOptions };
3133

32-
class HoistedComponent extends React.Component {
34+
class HoistedComponent extends React.Component<T> {
3335
render() {
3436
return (
3537
<LDProvider {...providerProps}>

0 commit comments

Comments
 (0)