Skip to content

Commit

Permalink
prepare 2.23.2 release (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaunchDarklyReleaseBot authored Oct 6, 2021
1 parent 4275608 commit 187cd0e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to the LaunchDarkly Client-side SDK for React

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

## Submitting bug reports and feature requests

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## LaunchDarkly overview

[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!
[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!

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

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

## Getting started

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

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.

Expand All @@ -41,7 +41,7 @@ We encourage pull requests and other contributions from the community. Check out
* 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?).
* 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.
* 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.
* 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.
* 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.
* Explore LaunchDarkly
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
Expand Down
2 changes: 1 addition & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface LDContext {
* An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`).
* This will be be undefined initially until initialization is complete.
*
* @see http://docs.launchdarkly.com/docs/js-sdk-reference
* @see https://docs.launchdarkly.com/sdk/client-side/javascript
*/
ldClient?: LDClient;
}
Expand Down
10 changes: 5 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export interface LDReactOptions {
* This is true by default, meaning that keys will automatically be converted to camel-case.
*
* For more information, see the React SDK Reference Guide on
* [flag keys](https://docs.launchdarkly.com/docs/react-sdk-reference#section-flag-keys).
* [flag keys](https://docs.launchdarkly.com/sdk/client-side/react/react-web#flag-keys).
*
* @see https://docs.launchdarkly.com/docs/react-sdk-reference#section-flag-keys
* @see https://docs.launchdarkly.com/sdk/client-side/react/react-web#flag-keys
*/
useCamelCaseFlagKeys?: boolean;
}
Expand All @@ -43,7 +43,7 @@ export interface ProviderConfig {
* A LaunchDarkly user object. If unspecified, a new user with a
* random key will be created and used. This user's key will remain constant across browser sessions.
*
* @see http://docs.launchdarkly.com/docs/js-sdk-reference#section-users
* @see https://docs.launchdarkly.com/sdk/features/user-config#javascript
*/
user?: LDUser;

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

Expand Down Expand Up @@ -98,7 +98,7 @@ export interface AllFlagsLDClient {
/**
* An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`).
*
* @see http://docs.launchdarkly.com/docs/js-sdk-reference
* @see https://docs.launchdarkly.com/sdk/client-side/javascript
*/
ldClient: LDClient;
}
2 changes: 1 addition & 1 deletion src/withLDConsumer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface LDProps {
/**
* An instance of `LDClient` from the LaunchDarkly JS SDK (`launchdarkly-js-client-sdk`)
*
* @see http://docs.launchdarkly.com/docs/js-sdk-reference
* @see https://docs.launchdarkly.com/sdk/client-side/javascript
*/
ldClient?: LDClient;
}
Expand Down
8 changes: 5 additions & 3 deletions src/withLDProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ import hoistNonReactStatics from 'hoist-non-react-statics';
* @param config - The configuration used to initialize LaunchDarkly's JS SDK
* @return A function which accepts your root React component and returns a HOC
*/
export function withLDProvider(config: ProviderConfig): (WrappedComponent: React.ComponentType) => React.ComponentType {
return function withLDProviderHoc(WrappedComponent: React.ComponentType): React.ComponentType {
export function withLDProvider<T = {}>(
config: ProviderConfig,
): (WrappedComponent: React.ComponentType<T>) => React.ComponentType<T> {
return function withLDProviderHoc(WrappedComponent: React.ComponentType<T>): React.ComponentType<T> {
const { reactOptions: userReactOptions } = config;
const reactOptions = { ...defaultReactOptions, ...userReactOptions };
const providerProps = { ...config, reactOptions };

class HoistedComponent extends React.Component {
class HoistedComponent extends React.Component<T> {
render() {
return (
<LDProvider {...providerProps}>
Expand Down

0 comments on commit 187cd0e

Please sign in to comment.