Skip to content
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

SSR app compatible #109

Closed
Fi1osof opened this issue Sep 27, 2018 · 1 comment
Closed

SSR app compatible #109

Fi1osof opened this issue Sep 27, 2018 · 1 comment

Comments

@Fi1osof
Copy link

Fi1osof commented Sep 27, 2018

In docs says "SSR app compatible".
Is this right?
Gallery component initialize with containerWidth = 0; https://github.com/neptunian/react-photo-gallery/blob/master/src/Gallery.js#L9
In render, if containerWidth == 0, return empty div. https://github.com/neptunian/react-photo-gallery/blob/master/src/Gallery.js#L37
Result: SSR return empty div anyway.
If i set state.containerWidth = 1200, yes, rendering fine.

P.S. it`s become from ^6.2.0. Older versions works fine too.

@neptunian
Copy link
Owner

neptunian commented Nov 23, 2018

I was able to get this once, then re installed the the gallery and i can't seem to get it anymore. i'll push a div with a space in it which should fix it complaining its empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants