From a03e7927bb2ad4fe0a11ab05996f5d46a6898bc1 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Mon, 6 Dec 2021 12:58:09 +0100 Subject: [PATCH] docs: JS proxy client: explain client keys --- website/docs/sdks/proxy-javascript.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/sdks/proxy-javascript.md b/website/docs/sdks/proxy-javascript.md index fd57286d607..47a0faff0e9 100644 --- a/website/docs/sdks/proxy-javascript.md +++ b/website/docs/sdks/proxy-javascript.md @@ -5,12 +5,14 @@ title: JavaScript Proxy SDK In this guide we explain how to use feature toggles in a Single Page App via [The Unleash Proxy](/sdks/unleash-proxy). You can also checkout the source code for the [JavaScript Proxy SDK](https://github.com/unleash/unleash-proxy-client-js). -### Introduction {#introduction} +## Introduction {#introduction} For single-page apps we have a tiny proxy-client in JavaScript, without any external dependencies, except from browser APIs. This client will store toggles relevant for the current user in local-storage and synchronize with the Unleash Proxy in the background. This means we can bootstrap the toggles for a specific use the next time the user visits the web-page. > We are looking in to also [supporting react-native](https://github.com/Unleash/unleash/issues/785) with this SDK. Reach out if you want to help us validate the implementation. +## How to use the JavaScript Proxy SDK + **Step 1: Install** ``` @@ -19,7 +21,7 @@ npm install unleash-proxy-client **Step 2: Initialize the SDK** -You need to have a Unleash-hosted instance, and the proxy need to be enabled. In addition you will need a proxy-specific clientKey in order to connect to the Unleash-hosted Proxy. +You need to have an Unleash-hosted instance, and the proxy need to be enabled. In addition you will need a proxy-specific `clientKey` in order to connect to the Unleash-hosted Proxy. For more on how to set up client keys, [consult the Unleash Proxy docs](unleash-proxy.md#configuration-variables). ```js import { UnleashClient } from 'unleash-proxy-client';