-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Server rendering the component. #65
Comments
Short term: the application should be able to render out without an errors and then be useable once react kicks in on page load. Long term: once we figure out a programatic drag api it might be feasible to server side render into a mid drag (although this seems a bit strange) Focusing on the short term then; can you please:
|
Thanks for getting back to me so fast. I can confirm that I am indeed using react-dom-server and can provide the error message below. I will try and comment with a small case that fails and the code tomorrow.
|
Yeah perfect - need to check we are not referencing any window globals in the initial render and then we should be good to go |
I'll wait for your test case so i can be sure that everything will work for you 👍 |
To make sure we are on the same page, when you say 'test case' do you mean a minimal build (backend code, frontend code, build code, etc) or just the components using the library? |
The best would be a full setup |
Hey! So i created a full set up and posted it here. I took the drag and drop example that is listed in this repo's readme and copied it into the DragNDrop.js. If you uncomment it in App.js and run the app, the following message appears.
It leads me to believe that the issue is in src/state/create-store.js. I'm going to open an issue to correct it. |
After your fix does SSR work how you expect it to? |
Yes it does! I guess this was a bug and not a feature. We can close once #66 is merged. |
Feature Request
Are there any plans to support serverside rendering of this library? Currently when rendered on the server an error is printed out.
The text was updated successfully, but these errors were encountered: