Skip to content

Commit

Permalink
feat(rr6): Tie react-router 6 to it's feature flag (#76470)
Browse files Browse the repository at this point in the history
This will allow us to slow roll react router 6
  • Loading branch information
evanpurkhiser authored Aug 28, 2024
1 parent ab96c55 commit 7225d3a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions static/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@
//
// [1]: https://sentry.io/careers/

// TODO(__SENTRY_USING_REACT_ROUTER_SIX): Very early on check if we're running
// using the react-router 6 faeture flag so we can enable ths beefore the app
// boots.
//
try {
// @ts-expect-error features is an array at this point. It is unfortuantely
// typed incorrectly
if (window.__initialData?.features?.includes('organizations:react-router-6')) {
window.__SENTRY_USING_REACT_ROUTER_SIX = true;
}
} catch {
// XXX: Just don't crash the app for any reason
}

async function app() {
// We won't need initalizeMainImport until we complete bootstrapping.
// Initaite the fetch, just don't await it until we need it.
Expand Down

0 comments on commit 7225d3a

Please sign in to comment.