You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`sdkKey`|`string`| Yes | SDK key for authentication |
185
-
|`context`|`Record<string, any>`| No | Default context for override evaluations |
186
-
|`defaults`|`Record<string, any>`| No | Default values if server is unavailable |
187
-
|`required`|`string[]` or `object`| No | Configs that must exist for initialization |
188
-
|`initializationTimeoutMs`|`number`| No | SDK initialization timeout (default: 5000) |
189
-
190
-
See [`@replanejs/sdk` documentation](https://github.com/replane-dev/replane-javascript/tree/main/packages/sdk#options) for the complete list of options.
|`sdkKey`|`string`| Yes | SDK key for authentication |
84
-
|`context`|`Record<string, any>`| No | Default context for override evaluations |
85
-
|`defaults`|`Record<string, any>`| No | Default values if server is unavailable |
86
-
|`required`|`string[]` or `object`| No | Configs that must exist for initialization |
87
-
|`initializationTimeoutMs`|`number`| No | SDK initialization timeout (default: 5000) |
88
-
89
-
See [`@replanejs/sdk` documentation](https://github.com/replane-dev/replane-javascript/tree/main/packages/sdk#options) for the complete list of options.
// Pass snapshot to client via props, context, or serialized HTML
137
143
138
144
// On the client
139
145
<ReplaneProvider
140
-
restoreOptions={{
141
-
snapshot,
142
-
// Optional: connect for live updates
143
-
connection: {
144
-
baseUrl: "https://your-replane-server.com",
145
-
sdkKey: "your-sdk-key",
146
-
},
146
+
options={{
147
+
baseUrl: "https://your-replane-server.com",
148
+
sdkKey: "your-sdk-key",
147
149
}}
150
+
snapshot={snapshot}
148
151
>
149
152
<App />
150
153
</ReplaneProvider>;
151
154
```
152
155
153
-
The restored client is immediately available with no loading state. If `connection` is provided, it will establish a connection for real-time updates in the background.
156
+
The restored client is immediately available with no loading state. The provider will establish a connection for real-time updates in the background.
0 commit comments