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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation with getServerSideProps #19
Comments
There are several reasons we use As far as tree-shaking or other advantages from using Let me know if I'm missing something other than tree-shaking, but AFAIK the seamless imports are the only bug advantage. |
I partly agree, but -- what are you using for the fallback then for a good user experience? I'm not sure what to show as a fallback on a client side navigation. TBH, freezing the page for a second seems better than layout shifts / random fallbacks. Problem is that the whole page suspends, so you cant really suspend parts of the page. I'm not saying |
We're currently using just a normal skeleton and spinner set up for a fallback. I agree it's not great, but our users were experiencing navigation delays that could take up to 5 seconds for an un-cached page. Hopefully As far as an alternative implementation using |
I don't showing skeleton and a spinner is acceptable for us. Btw, tried to check UX on your website to see how it looks but it seems under registration. P.S. I would like to integrate this to be used at https://opensea.io/ |
Just to clarify, is the feature request here to delay page transition until the new page's data is ready? There are a lot of problems with actually implementing this library with
Many of the benefits of Relay come from being able to decide when and how to perform data fetching. Forcing everything into |
Makes sense. In that case I think a sensible solution would be to delay page transition until data for next page is loaded. This would only be needed on navigation to new pages, but if you navigated to somewhere you previously were, it would be cached. Do you think that is possible? |
There's no built-in way to preload the data AFAIK, but to emulate the behavior of
In addition you'll need to add a spinner somewhere in your app to indicate that this is loading. For more info on the issues with Outside of Next.js (e.g. Facebook), Relay's entry points API is used for this purpose. I'm going to close this out as it can be done in user space, there's not much that can be done at the page-level (where this library operates) to help with this. |
Hi 馃憢
Thanks for this library -- its great. I have a question regarding data fetching. I see that currently
getInitialProps
is used. What is the rationale behind this?If it would be possible to move to
getServerSideProps
, we could get rid of the fallback + we would be able to tree shake server code.The text was updated successfully, but these errors were encountered: