@remix-run/router 0.0.0-experimental-4841e12b → 0.0.0-experimental-3e5084cc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v0.0.0-experimental-4841e12b
2
+ * @remix-run/router v0.0.0-experimental-3e5084cc
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1725,10 +1725,10 @@ function createRouter(init) {
1725
1725
  }
1726
1726
 
1727
1727
  // "Initialized" here really means "Can `RouterProvider` render my route tree?"
1728
- // Prior to `route.Fallback`, we only had a root `fallbackElement` so we used
1728
+ // Prior to `route.InitialFallback`, we only had a root `fallbackElement` so we used
1729
1729
  // `state.initialized` to render that instead of `<DataRoutes>`. Now that we
1730
1730
  // support route level fallbacks we can always render and we'll just render
1731
- // as deep as we have data for and detect the nearest ancestor Fallback
1731
+ // as deep as we have data for and detect the nearest ancestor InitialFallback
1732
1732
  let initialized = future.v7_partialHydration ||
1733
1733
  // All initialMatches need to be loaded before we're ready. If we have lazy
1734
1734
  // functions around still then we'll need to run them in initialize()
@@ -2441,7 +2441,9 @@ function createRouter(init) {
2441
2441
  // state. If not, we need to switch to our loading state and load data,
2442
2442
  // preserving any new action data or existing action data (in the case of
2443
2443
  // a revalidation interrupting an actionReload)
2444
- if (!isUninterruptedRevalidation) {
2444
+ // If we have partialHydration enabled, then don't update the state for the
2445
+ // initial data load since iot's not a "navigation"
2446
+ if (!isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration)) {
2445
2447
  revalidatingFetchers.forEach(rf => {
2446
2448
  let fetcher = state.fetchers.get(rf.key);
2447
2449
  let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);