Fixes issue #9 for server-side rendering#10
Fixes issue #9 for server-side rendering#10hampusohlsson wants to merge 1 commit intocomponent:masterfrom
Conversation
|
Fix this issue in my fork https://github.com/sashashakun/ssr-scroll-to |
|
In fact, you should NOT load this on server side. What do you need for this on the server-side? |
|
@cusspvz have you never heard about server side rendering of react code? It's a way for pages to load faster and with better seo for example |
|
I know what SSR is, and I'm asking you why you need it on SSR. You see, on the Server side, you won't be messing with the dom, neither with a window, since SSR doesn't require an headless browser. So, simply use |
|
Basically what I'm telling you is do not bring up this repo to your server code, it will only waste your server's resources because it will not be used. The SSR "fix" should be made at your code base instead of this repo. |
|
Sure, that is one option, but I'm using ES6 |
|
But I respect your opinion. Will look for an alternative library |
|
Give a look at scroll |
|
This issue causes problems when using Jest to test React components. Please merge the PR. |
|
Yeah, that ^ |
|
If you're using Jest, you can just mock it until this gets merged. ie: jest.mock('scroll-to-element', () => 'scroll-to-element'); |

This should fix issue #9