The paradigm of Remix for those of us who persist in old ways #3128
Replies: 2 comments 8 replies
-
I believe what Ryan is alluding to is to keep Apollo on the server. Use loaders for queries and actions for mutations. Then your routes only need to You can still leverage your knowledge of Apollo, just keep it on the server instead of in your route components. Remember, normal components that are part of the route can still call It may be helpful if you can ask specific questions on how to use Remix with Apollo. |
Beta Was this translation helpful? Give feedback.
-
So is the takeaway here to rewrite everything to loaders and actions? What about the benefits of Apollo cache?
If we reframe this as a trade-off, I think downloading all of that JS allows you to download the cache, and have subsequent requests skip the SSR path, download a small quantity of data, or if the data is cached, skip the network completely. I also found this Discord discussion on the subject https://discord.com/channels/770287896669978684/1230493730742730882 I'm trying to see if it's worth migrating for my Apollo, but so far it's unclear what a good way to do things is. |
Beta Was this translation helpful? Give feedback.
-
Adopting Remix has been somewhat challenging due to the different paradigm and thought patterns that is required by the developer to efficiently adopt and use Remix. One of these paradigms, is the usage of Apollo client within the application. This discussion is directly related to the Apollo client example that was created here: #1626.
Users who are new to Remix, like myself and the company I work at, are tied into the old ways of doing things (old? perhaps just different ways :) ). These ways were explicitly highlighted by @ryanflorence here as being inefficient and more so, against the ways of how Remix does things. These points were directed towards the apollo client example but they also apply to many other things that one might approach.
A quick reference to Ryans points on that PR:
Here is my original comment on the pr that I was hoping to get answered, as it's quite important for myself and for others.
Beta Was this translation helpful? Give feedback.
All reactions