Skip to content

Commit 8f8aeb2

Browse files
committed
Use <Activity> from Canary
1 parent 618880c commit 8f8aeb2

File tree

7 files changed

+78
-95
lines changed

7 files changed

+78
-95
lines changed

crates/next-core/src/next_config.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,11 +1693,6 @@ impl NextConfig {
16931693
Vc::cell(self.experimental.taint.unwrap_or(false))
16941694
}
16951695

1696-
#[turbo_tasks::function]
1697-
pub fn enable_router_bfcache(&self) -> Vc<bool> {
1698-
Vc::cell(self.experimental.router_bfcache.unwrap_or(false))
1699-
}
1700-
17011696
#[turbo_tasks::function]
17021697
pub fn enable_view_transition(&self) -> Vc<bool> {
17031698
Vc::cell(self.experimental.view_transition.unwrap_or(false))

crates/next-core/src/next_import_map.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ pub async fn get_next_client_import_map(
129129
let react_flavor = if *next_config.enable_ppr().await?
130130
|| *next_config.enable_taint().await?
131131
|| *next_config.enable_view_transition().await?
132-
|| *next_config.enable_router_bfcache().await?
133132
{
134133
"-experimental"
135134
} else {
@@ -833,9 +832,8 @@ async fn apply_vendored_react_aliases_server(
833832
) -> Result<()> {
834833
let ppr = *next_config.enable_ppr().await?;
835834
let taint = *next_config.enable_taint().await?;
836-
let router_bfcache = *next_config.enable_router_bfcache().await?;
837835
let view_transition = *next_config.enable_view_transition().await?;
838-
let react_channel = if ppr || taint || view_transition || router_bfcache {
836+
let react_channel = if ppr || taint || view_transition {
839837
"-experimental"
840838
} else {
841839
""

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"@types/jest": "29.5.5",
145145
"@types/node": "20.17.6",
146146
"@types/node-fetch": "2.6.1",
147-
"@types/react": "19.1.10",
147+
"@types/react": "19.1.13",
148148
"@types/react-dom": "19.1.7",
149149
"@types/relay-runtime": "14.1.13",
150150
"@types/string-hash": "1.1.1",
@@ -300,7 +300,7 @@
300300
"@babel/parser": "7.27.0",
301301
"@babel/types": "7.27.0",
302302
"@babel/traverse": "7.27.0",
303-
"@types/react": "19.1.10",
303+
"@types/react": "19.1.13",
304304
"@types/react-dom": "19.1.7",
305305
"@types/retry": "0.12.0",
306306
"jest-snapshot": "30.0.0-alpha.6",

packages/next/src/client/components/layout-router.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from './router-reducer/router-reducer-types'
1717

1818
import React, {
19+
Activity,
1920
useContext,
2021
use,
2122
startTransition,
@@ -42,10 +43,6 @@ import { dispatchAppRouterAction } from './use-action-queue'
4243
import { useRouterBFCache, type RouterBFCacheEntry } from './bfcache'
4344
import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'
4445

45-
const Activity = process.env.__NEXT_ROUTER_BF_CACHE
46-
? (require('react') as typeof import('react')).unstable_Activity
47-
: null!
48-
4946
/**
5047
* Add refetch marker to router state at the point of the current layout segment.
5148
* This ensures the response returned is not further down than the current layout segment.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { NextConfig } from '../server/config-shared'
22

33
export function needsExperimentalReact(config: NextConfig) {
4-
const { ppr, taint, viewTransition, routerBFCache } =
5-
config.experimental || {}
6-
return Boolean(ppr || taint || viewTransition || routerBFCache)
4+
const { ppr, taint, viewTransition } = config.experimental || {}
5+
return Boolean(ppr || taint || viewTransition)
76
}

0 commit comments

Comments
 (0)