Open iamstarkov opened 1 year ago
Hi @iamstarkov,
Let me research on this and speak with one of the JS devs specifically.
Relates to #186
Hey @mikechu-optimizely, Any updates on this?
@junaed-optimizely Can we pair up on SSR & CSR when you're back from holiday? DM me please 😄
We have a work epic (series of tickets) to create a starter-kit or examples for CSR, SSR, and hybrid. We have already identified some rough edges that we want to provide guidance around or software updates to resolve. We'll start the first of these tickets in an upcoming sprint to show reference implementations. Please stay tuned.
createInstance
on both server and client to get optimizelyclient
.client.setUser({ id: userId })
with the same user id and attributes on both server and client.<OptimizelyProvider optimizely={client} user={{ id: userId }}>
and both server (withisServerSide
prop) and client.useDecision
hook on both server and client and use the deriveddecision
to rendertrue
orfalse
if feature flag is disabled or not.I have tried to run
client.decideAll()
to get serialisable decisions on the server and tried to supply it to client-side created instance of the client, but I could not find a way to do it. Can you help?