-
Notifications
You must be signed in to change notification settings - Fork 45
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
NextJS Rendering #22
Comments
Experiencing the same issue |
FYI - I started dynamically importing the module and it looks to be rendering properly now. https://nextjs.org/docs/advanced-features/dynamic-import
|
@gregegan is it still working for you? Cause after a couple of refreshes (without dynamic imports), the problem I described would still occur. So I just want to make sure that with dynamic imports it works. |
I got it working properly with dynamic imports, yes..... The serverside render definitely renders different markup then the clientside... so just dynamically importing it forces it to only clientside render. |
@gregegan one last thing. Have you had it working without dynamic imports? Like just have the Variants render regular components. <Variant name="A">
<div>
//Other elements in here
</div>
</Variant>
<Variant name="B">
<div>
//Other elements in here
</div>
</Variant> |
I never got it working properly without dynamic imports, I was experiencing the same issue as you. |
Ah. So thats where I am stuck. |
Solve it the same way. Thank you @gregegan it was the solution to use dynamic import |
I created an example here: react-ab-test/examples/next/src/pages/index.js Lines 31 to 43 in f48b4a5
Let me know if that helps! |
Table of Contents
Expected Behavior
The Experiment should render one variation and it should be displayed properly
Setup:
Current Behavior
The Experiment does render a variation but it does not render the proper elements and its children.
Outcome:
Possible Solution
Steps to Reproduce (for bugs)
sessionId
from express-session to the ExperimentuserIdentifier
propContext
I can not show different variants properly if the rendering keeps breaking.
Your Environment
The text was updated successfully, but these errors were encountered: