How has Remix solved the, quote, drawback of sometimes needing and sharing client-side state across routes? Client-side state across routes? You can use classic context providers. The page transitions are client-side so they're not gonna dump your JavaScript and reload it, so that's how I do it. There's other ways I'm sure, but that's how I've been doing it.
Speaking of performance and techniques for that, would you recommend, or have you used the worker API to fetch data behind the scenes? I haven't, so I don't know that much about that one. Sorry.
Okay, if you had a products overview page, say, and this page had 100 plus products and each product had their own page, should you pre-render everything? I don't know, if it's going to be like, if it's going to, I might experiment with it, but if it's showing like hundreds of products per page, maybe you separate on the server into that deferred value and have some things get loaded kind of ahead of time, but things below the fold could be streamed up. Maybe I would experiment with that, and then I'd probably just experiment with some other approaches. I don't know the perfect answer for that one because that sounds to me like architecture that you shouldn't have a perfect answer for something unless you play with it. So I would play with it. Maybe like an intersection type thing? Yeah, something like that. At some point on scroll? Yeah, that sounds good. I think... You want to return something so it's good for SEO. Yeah, exactly. But maybe if you can't see everything in a way. But you can't see everything when you first load the page, it's below the fold. So I mean, the user's going to think that everything was there. They're going to look at a few things. They're going to start to scroll. Those things are going to just be there and the images will be lazy loaded too, right? Yep. There you go. That sounds good to me.
Is the pre-rendering on Hover being done server side or client side? If the latter, won't moving the mouse everywhere slow everything down? Well, it's fetching things behind the scenes. So I mean, if you're on any big website like Twitter or Facebook, I mean, if you want to go to the network tab, it's always going to be doing all kinds of things behind the scenes. So I don't think it's really slowing things down. But when you go to Hover over something, we're just doing an Ajax request to get something.
Comments