Theme switch request revalidates all other loaders. Can this be prevented? #765
-
I know about shouldRevalidate. But the way I understand it, I'd need to do that for every loader in the app, to detect if the request that was made was the theme update. Is there a way to do this in a more global way? Preventing all loaders from revalidate when the theme switch request is sent. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You could make the request using regular fetch. Or you could skip the request and just assign document.cookie directly, but then in the unlikely event any of your data depends on the theme it would not revalidate... I have a situation like this in my app though so it does happen. |
Beta Was this translation helpful? Give feedback.
You could make the request using regular fetch. Or you could skip the request and just assign document.cookie directly, but then in the unlikely event any of your data depends on the theme it would not revalidate... I have a situation like this in my app though so it does happen.