routeContext.tsx 382 B

1234567891011
  1. import {createContext} from 'react';
  2. import type {RouteContextInterface} from 'sentry/types/legacyReactRouter';
  3. /**
  4. * This is a legacy context that is primarily used in tests currently to allow
  5. * for mocking the use{Location,Navigate,Routes,Params} hooks
  6. *
  7. * DO NOT use this outside of tests!
  8. */
  9. export const RouteContext = createContext<RouteContextInterface | null>(null);