Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix js client quickstart #542

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/sdks/client-sdks/javascript/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@ First, initialize the SDK using your SDK key. The SDK key is different from the


```js
import Eppo from "@eppo/js-client-sdk";
import { init } from "@eppo/js-client-sdk";

const eppo = new Eppo({
apiKey: 'SDK_KEY',
});
```
await init({ apiKey: "<SDK-KEY-FROM-DASHBOARD>" });
```

:::note
The SDK key is different from the project API key. You can find your SDK key in the [SDK Keys section of the Eppo interface](https://eppo.cloud/configuration/environments/keys).
Expand Down Expand Up @@ -118,6 +116,7 @@ const variation = eppoClient.getStringAssignment(
subjectAttributes,
defaultValue
);

```

### Assignment Types
Expand Down Expand Up @@ -327,4 +326,4 @@ Now that you've seen how to make assignments with the Eppo JavaScript SDK, we st
- [Initialization Configuration](/sdks/client-sdks/javascript/initialization)
- [Assignment details](/sdks/client-sdks/javascript/assignments)
- [Using the SDK with React](/sdks/client-sdks/javascript/react)
- [Using the SDK with Next.js](/sdks/client-sdks/javascript/nextjs-setup) if you are using Next.js
- [Using the SDK with Next.js](/sdks/client-sdks/javascript/nextjs-setup) if you are using Next.js