Skip to content

Commit fefe925

Browse files
[FSSDK-8959] [React] Update Non-Code-Path SDK Resources (#190)
* Rename fullstack to feature experimentation * Update readme and package.json * Fix pr * Cleanup * Update link in readme # Conflicts: # package.json
1 parent bfc8a84 commit fefe925

File tree

5 files changed

+55
-30
lines changed

5 files changed

+55
-30
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [2.9.2] - March 13, 2023
99

10-
- None yet!
10+
### Enhancements
11+
- We updated our README.md and other non-functional code to reflect that this SDK supports both Optimizely Feature Experimentation and Optimizely Full Stack. ([#190](https://github.com/optimizely/react-sdk/pull/190)).
1112

1213
## [2.9.1] - July 20, 2022
1314

README.md

+48-24
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# Optimizely React SDK
22

3-
This repository houses the React SDK for use with Optimizely Full Stack and Optimizely Rollouts.
3+
This repository houses the React SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).
44

5-
Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the [documentation](https://docs.developers.optimizely.com/full-stack/docs).
5+
Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).
66

7-
Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the [documentation](https://docs.developers.optimizely.com/rollouts/docs).
7+
Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap.
8+
9+
## Get Started
10+
11+
Refer to the [React SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/javascript-react-sdk) for detailed instructions on getting started with using the SDK.
812

913
### Features
1014

1115
- Automatic datafile downloading
1216
- User ID + attributes memoization
1317
- Render blocking until datafile is ready via a React API
1418
- Optimizely timeout (only block rendering up to the number of milliseconds you specify)
15-
- Library of React components and hooks to use with [feature flags](https://docs.developers.optimizely.com/full-stack/v4.0/docs/create-feature-flags)
19+
- Library of React components and hooks to use with [feature flags](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/create-feature-flags)
1620

1721
### Compatibility
1822

@@ -57,21 +61,15 @@ class App extends React.Component {
5761
}
5862
```
5963

60-
# Contents
61-
62-
1. [Installation](#installation)
63-
2. [Usage](#usage)
64-
3. [Credits](#credits)
65-
4. [Additional code](#additional-code)
66-
5. [Contribute to this repo](#contribute-to-this-repo)
67-
68-
# Installation
64+
### Install the SDK
6965

7066
```
7167
npm install @optimizely/react-sdk
7268
```
7369

74-
# Usage
70+
## Use the React SDK
71+
72+
### Initialization
7573

7674
## `createInstance`
7775

@@ -80,8 +78,8 @@ The `ReactSDKClient` client created via `createInstance` is the programmatic API
8078
_arguments_
8179

8280
- `config : object` Object with SDK configuration parameters. This has the same format as the object passed to the `createInstance` method of the core `@optimizely/javascript-sdk` module. For details on this object, see the following pages from the developer docs:
83-
- [Instantiate](https://docs.developers.optimizely.com/full-stack/v4.0/docs/initialize-sdk-react)
84-
- [JavaScript: Client-side Datafile Management](https://docs.developers.optimizely.com/full-stack/v4.0/docs/javascript-client-side-implementation)
81+
- [Instantiate](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/initialize-sdk-react)
82+
- [JavaScript: Client-side Datafile Management](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/javascript-client-side-implementation)
8583

8684
_returns_
8785

@@ -321,7 +319,7 @@ The following type definitions are used in the `ReactSDKClient` interface:
321319
- `VariableValuesObject : { [key: string]: any }`
322320
- `EventTags : { [key: string]: string | number | boolean; }`
323321

324-
`ReactSDKClient` instances have the methods/properties listed below. Note that in general, the API largely matches that of the core `@optimizely/optimizely-sdk` client instance, which is documented on the [Optimizely X Full Stack developer docs site](https://docs.developers.optimizely.com/full-stack/docs). The major exception is that, for most methods, user id & attributes are **_optional_** arguments. `ReactSDKClient` has a current user. This user's id & attributes are automatically applied to all method calls, and overrides can be provided as arguments to these method calls if desired.
322+
`ReactSDKClient` instances have the methods/properties listed below. Note that in general, the API largely matches that of the core `@optimizely/optimizely-sdk` client instance, which is documented on the [Optimizely Feature Experimentation developer docs site](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome). The major exception is that, for most methods, user id & attributes are **_optional_** arguments. `ReactSDKClient` has a current user. This user's id & attributes are automatically applied to all method calls, and overrides can be provided as arguments to these method calls if desired.
325323

326324
- `onReady(opts?: { timeout?: number }): Promise<onReadyResult>` Returns a Promise that fulfills with an `onReadyResult` object representing the initialization process. The instance is ready when it has fetched a datafile and a user is available (via `setUser` being called with an object, or a Promise passed to `setUser` becoming fulfilled). If the `timeout` period happens before the client instance is ready, the `onReadyResult` object will contain an additional key, `dataReadyPromise`, which can be used to determine when, if ever, the instance does become ready.
327325
- `user: User` The current user associated with this client instance
@@ -345,7 +343,7 @@ The following type definitions are used in the `ReactSDKClient` interface:
345343

346344
## Rollout or experiment a feature user-by-user
347345

348-
To rollout or experiment on a feature by user rather than by random percentage, you will use Attributes and Audiences. To do this, follow the documentation on how to [run a beta](https://docs.developers.optimizely.com/rollouts/docs/run-a-beta) using the React code samples.
346+
To rollout or experiment on a feature by user rather than by random percentage, you will use Attributes and Audiences. To do this, follow the documentation on how to [run a beta](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/run-a-beta) using the React code samples.
349347

350348
## Server Side Rendering
351349

@@ -426,11 +424,7 @@ const optimizely = createInstance({
426424
});
427425
```
428426

429-
# Credits
430-
431-
First-party code subject to copyrights held by Optimizely, Inc. and its contributors and licensed to you under the terms of the Apache 2.0 license.
432-
433-
# Additional code
427+
### Additional code
434428

435429
This repository includes the following third party open source code:
436430

@@ -497,6 +491,36 @@ To regenerate the dependencies use by this package, run the following command:
497491
npx license-checker --production --json | jq 'map_values({ licenses, publisher, repository }) | del(.[][] | nulls)'
498492
```
499493

500-
# Contribute to this repo
494+
### Contributing
501495

502496
Please see [CONTRIBUTING](./CONTRIBUTING.md) for more information.
497+
498+
### Credits
499+
500+
First-party code subject to copyrights held by Optimizely, Inc. and its contributors and licensed to you under the terms of the Apache 2.0 license.
501+
502+
### Other Optimizely SDKs
503+
504+
- Agent - https://github.com/optimizely/agent
505+
506+
- Android - https://github.com/optimizely/android-sdk
507+
508+
- C# - https://github.com/optimizely/csharp-sdk
509+
510+
- Flutter - https://github.com/optimizely/optimizely-flutter-sdk
511+
512+
- Go - https://github.com/optimizely/go-sdk
513+
514+
- Java - https://github.com/optimizely/java-sdk
515+
516+
- JavaScript - https://github.com/optimizely/javascript-sdk
517+
518+
- PHP - https://github.com/optimizely/php-sdk
519+
520+
- Python - https://github.com/optimizely/python-sdk
521+
522+
- React - https://github.com/optimizely/react-sdk
523+
524+
- Ruby - https://github.com/optimizely/ruby-sdk
525+
526+
- Swift - https://github.com/optimizely/swift-sdk

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@optimizely/react-sdk",
3-
"version": "2.9.1",
4-
"description": "React SDK for Optimizely Full Stack and Optimizely Rollouts",
3+
"version": "2.9.2",
4+
"description": "React SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts",
55
"homepage": "https://github.com/optimizely/react-sdk",
66
"license": "Apache-2.0",
77
"module": "dist/react-sdk.es.js",

src/client.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('ReactSDKClient', () => {
107107
expect(createInstanceSpy).toBeCalledWith({
108108
...config,
109109
clientEngine: 'react-sdk',
110-
clientVersion: '2.9.1',
110+
clientVersion: '2.9.2',
111111
});
112112
});
113113

src/client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export type OnReadyResult = {
4242
};
4343

4444
const REACT_SDK_CLIENT_ENGINE = 'react-sdk';
45-
const REACT_SDK_CLIENT_VERSION = '2.9.1';
45+
const REACT_SDK_CLIENT_VERSION = '2.9.2';
4646

4747
export interface ReactSDKClient extends Omit<optimizely.Client, 'createUserContext'> {
4848
user: UserInfo;

0 commit comments

Comments
 (0)