-
Notifications
You must be signed in to change notification settings - Fork 40
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
window is not defined #65
Comments
@killiansc I do not know what exactly limit the SSR has in comparison to CSR in terms of app rendering, but it seems that at the present moment it is not possible to render the whole running component on server side. filestack-react is not a typical component, in the sense that it does not contain any DOM (except button or link) or own event handlers. It's more a layer of abstraction on filestack-js. It just calls methods from filestack-js sdk which dynamically load some scripts to build filestack-picker app and probably this scripts are not able to be rendered on server side. You can check some workarounds for similar issue, people try to use ‘dynamic imports’ for it in this case. |
@AndrzejSala alright thanks, so for future reference, here is the solution I decided to implement:
We were already using loadable components, so I took advantage of it. |
Also works to simply use the library included with Next.js. Example: Importing into a parent component:
Child component:
|
Hey,
When using server-side rendering, and
import ReactFilestack from 'filestack-react';
, I run into the following problem:So I have to conditionally import the component, which is not really convenient:
Because of that I also have a mismatch between server and client sides, as the button is not rendered on the server side but is on the client side.
The filestack-react version I use is 2.0.6.
The text was updated successfully, but these errors were encountered: