MCPcopy Create free account
hub / github.com/dailydotdev/apps / watch

Function watch

packages/shared/src/components/shell/ShellCluster.spec.tsx:229–236  ·  view source on GitHub ↗
(queryKey: string[], data: unknown)

Source from the content-addressed store, hash-verified

227 Object.defineProperty(window, 'scrollY', { configurable: true, value: 0 });
228 const paged = { pages: ['first', 'second'], pageParams: [null, 'cursor'] };
229 const watch = (queryKey: string[], data: unknown) => {
230 queryClient.setQueryData(queryKey, data);
231 return new QueryObserver(queryClient, {
232 queryKey,
233 queryFn: () => data,
234 staleTime: Infinity,
235 }).subscribe(() => undefined);
236 };
237 const stop = [
238 watch(['popular'], paged),
239 watch(['ads', 'popular'], paged),

Callers 15

RoleInfoSectionFunction · 0.85
ContentSectionFunction · 0.85
ProfileMonthYearSelectFunction · 0.85
ProfileLocationFunction · 0.85
SourceStackModalFunction · 0.85
CurrentExperienceSwitchFunction · 0.85
ProfileGithubRepositoryFunction · 0.85
ProfileCompanyFunction · 0.85
UserStackModalFunction · 0.85
UserCertificationFormFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected