idiotWu / react-smooth-scrollbar

[Not Actively Maintained] A wrapper for smooth-scrollbar to React Component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Universal React Server Rendering

aight8 opened this issue · comments

I'm not familiar with server side rendering, I guess the problem now is smooth-scrollbar tries to access window object at init that causes the crash, right?

Yes, or the document object. Since the additional DOM creating happens in the underlaying smooth-scrollbar library this component should prevent the initialize when no DOM is present.

@aight8 server side rendering is now supported since version 7.0, however I'm not able to do fully test on server rendering, I'll appreciate if you can do further tests on it :)

Be careful that style files is bundled with js files in v7.0.0, so you may get error when trying to import stylesheets through <link> tag.

Oh no, style-loader will also cause break...

Well, they got separated again in v7.1, @aight8 try updating to this version please😅

Sorry for the late answer :D But this works so far! Thank you very much.