dehydrateNew #8195
              
                Unanswered
              
          
                  
                    
                      aleksanderd
                    
                  
                
                  asked this question in
                General
              
            
            
              dehydrateNew
            
            #8195
          
          
        Replies: 1 comment
-
| 
         is it a good solution? export const getDehydrateNew = cache(() => {
  const doneHashes: string[] = [];
  return (client: QueryClient) =>
    dehydrate(client, {
      shouldDehydrateQuery: ({ queryHash }) => {
        if (doneHashes.includes(queryHash)) {
          return false;
        } else {
          doneHashes.push(queryHash);
          return true;
        }
      },
    });
});RSC: ...
const dehydrateNew = getDehydrateNew();
const dehydratedState = dehydrateNew(queryClient);
... | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
What about dehydrateNew function? Is there any plans, drafts, etc?
Thank you!
https://tanstack.com/query/latest/docs/framework/react/guides/advanced-ssr
Beta Was this translation helpful? Give feedback.
All reactions