__Issue description__:
I am rendering a react component on the server using ReactJS.NET but because window and document don't exist on the server, tinyslider runs into issues when trying to work. I propose that we build in logic to the slider to avoid errors when window and document are not defined. This will not affect functionality, it will just allow error-free rendering.
__Demo link/slider setting__: n/a
_Tiny-slider version_: n/a
_Browser name && version_: n/a
_OS name && version_: n/a
After investigation I don't think this is possible because of dependencies also needing window and document.
I think that a big warning should be displayed in the README since this won't work with server-side rendered apps.
I think that a big warning should be displayed in the README since this won't work with server-side rendered apps.
Yes this is true, my solution was to wrap the calls to tns in something like this
if(process.env.NODE_ENV !== 'server') {
tns({...});
}
Most helpful comment
Yes this is true, my solution was to wrap the calls to
tnsin something like this