From cfa0e77b7d70afba26ed2869d53f422bd50ec80e Mon Sep 17 00:00:00 2001 From: brock-statsig <146870406+brock-statsig@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:33:20 -0800 Subject: [PATCH] Update initialize.mdx --- docs/client/concepts/initialize.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/client/concepts/initialize.mdx b/docs/client/concepts/initialize.mdx index c901f2438..4111d81bf 100644 --- a/docs/client/concepts/initialize.mdx +++ b/docs/client/concepts/initialize.mdx @@ -92,8 +92,8 @@ This architecture requires running a server SDK that supports the `getClientInit Your server SDK will maintain a fresh configuration in memory and when a request hits your route handler, you should call `getClientInitializeResponse()`, passing in a StatsigUser Object to generate the configuration object that gets passed to the client SDK for synchronous initialization. #### Implementation Notes: -* You should pass the same user object on both the server and client side. -* The `initializeValues` option should be an Object. +* You should pass the same user object on both the server and client side - take care that these stay in sync. This can become particularly hairy in the case of keeping stableID in sync, as it'll re-generate when it doesn't exist. See [here](https://docs.statsig.com/client/javascript-sdk#keeping-stableid-consistent-across-client--server). +* The `initializeValues` option should be an Object - except in our js SDK, where its expected to be a string. Calling .stringify() on the object should work. Example: @@ -224,4 +224,4 @@ evaluated_keys: { }; /** The hashing algorithm used */ hash_used: string; -``` \ No newline at end of file +```