python8u
python8u
TTCTheo's Typesafe Cult
Created by python8u on 4/12/2024 in #questions
I want to get information from the indexedDB and include this in the first render, without delay
this is blocking me because I have OCD
5 replies
TTCTheo's Typesafe Cult
Created by python8u on 4/12/2024 in #questions
I want to get information from the indexedDB and include this in the first render, without delay
help much appreciated
5 replies
TTCTheo's Typesafe Cult
Created by python8u on 4/11/2024 in #questions
downsides to Using IndexedDB/LocalStorage as a cache?
@noblica @keef (Rustular CVO)
18 replies
TTCTheo's Typesafe Cult
Created by python8u on 4/11/2024 in #questions
downsides to Using IndexedDB/LocalStorage as a cache?
thanks both for the help. followup question: once I have the indexedDB, I want to get information from the indexedDB and include this in the first render. However, all nextjs code executes during hydration, after the first render. However, I find it entirely possible to include information from indexedDB in this first render, because it's just client side information. What's the idiomatic way to accomplish this?
18 replies
TTCTheo's Typesafe Cult
Created by python8u on 4/11/2024 in #questions
downsides to Using IndexedDB/LocalStorage as a cache?
merkle tree? 💀 seems like over engineering though. or just hash the last 15 messages, because that's realistically what the user is gonna look at, then you can just prefetch the rest
18 replies
TTCTheo's Typesafe Cult
Created by python8u on 4/11/2024 in #questions
downsides to Using IndexedDB/LocalStorage as a cache?
yeah, seems like the role for the library to handle all the weird edge cases, which is why i’m confused that there isn’t much talk about it from nextjs. and I think it’s useful in most situations, even if u have a fine internet connection, as you can save like 1-2 seconds every time someone enters ur app
18 replies
TTCTheo's Typesafe Cult
Created by python8u on 4/11/2024 in #questions
downsides to Using IndexedDB/LocalStorage as a cache?
u could do that and check client side, or u could use server components, and have the client send the hash of the messages in cookies so the server makes the equality check with the hash stored in db.
18 replies