-
Notifications
You must be signed in to change notification settings - Fork 36
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
how do you supply a decision from server-side rendering to client-side rendering? #185
Comments
Hi @iamstarkov, Let me research on this and speak with one of the JS devs specifically. |
Relates to #186 |
Hey @mikechu-optimizely, |
@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. |
@mikechu-optimizely Any update on this? Specifically looking for details around implementing Optimizely FX in Remix on Cloudflare Pages. |
@junaed-optimizely, I don't see an FSSDK backlog entry for this. Do you have any updates? If not, can you write a story and note the ticket here? We need to put together more info in around our SSR vs CSR implementation. |
@iamstarkov, I am curious to know about the mismatch in detail. Also it would be nice to know more about the implementation detail as well, like what framework are you using, and how and where you are creating the instance! Here is a POC that might be helpful - nextjs-optimizely. |
@mikechu-optimizely, I agree 100%. Our documentation does not have enough implementation detail on SSR. I have created an internal ticket FSSDK-10777 to address this. |
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?The text was updated successfully, but these errors were encountered: