-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fixes issue #9 for server-side rendering #10
base: master
Are you sure you want to change the base?
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