Revalidating a single loader (for realtime) #5639
Replies: 2 comments
-
I have an ask for something that I think is similar or may help solve this use case. I would like an additional param added to I have loaders that I only want to trigger when I'm currently achieving this by comparing |
Beta Was this translation helpful? Give feedback.
-
@barbinbrad Have you ever found a solution for this? |
Beta Was this translation helpful? Give feedback.
-
In the supabase subscriptions example, we have something like this:
I believe that this is going to refetch all routes when a "click" is inserted. I think
useRevalidator
would do the same.In the example, this is no problem -- but at scale -- this is a becomes a little more expensive. Sure we can define all types of business logic inside of
shouldRevalidate
-- but what would be really nice is if we had a mechanism to revalidate one route (like an action can post to one route). For me the really beautiful part about theloader
is that it defines the "data requirements" of a route. If we could combine subscriptions with targeted revalidators, I think we could create some really nice UXs that aren't too heavy on the data fetching.Here's what I was thinking:
Beta Was this translation helpful? Give feedback.
All reactions