-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into fix/router-filter-check
- Loading branch information
Showing
34 changed files
with
807 additions
and
470 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ | |
"registry": "https://registry.npmjs.org/" | ||
} | ||
}, | ||
"version": "14.0.5-canary.53" | ||
"version": "14.0.5-canary.54" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
test/e2e/app-dir/ppr-navigations/avoid-popstate-flash/app/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ShouldFallbackThrowContainer } from './some-page/client' | ||
|
||
export default function Root({ children }) { | ||
return ( | ||
<html> | ||
<body> | ||
<ShouldFallbackThrowContainer>{children}</ShouldFallbackThrowContainer> | ||
</body> | ||
</html> | ||
) | ||
} |
9 changes: 9 additions & 0 deletions
9
test/e2e/app-dir/ppr-navigations/avoid-popstate-flash/app/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Link from 'next/link' | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<Link href="/some-page">Some page</Link> | ||
</div> | ||
) | ||
} |
45 changes: 45 additions & 0 deletions
45
test/e2e/app-dir/ppr-navigations/avoid-popstate-flash/app/some-page/client.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
'use client' | ||
|
||
import { Component, createContext, use, useState } from 'react' | ||
|
||
const ShouldFallbackThrowContext = createContext(false) | ||
|
||
export function ShouldFallbackThrowContainer({ children }) { | ||
const [shouldFallbackThrow, setShouldFallbackThrow] = useState(false) | ||
return ( | ||
<> | ||
<label> | ||
Throw if fallback appears | ||
<input | ||
id="should-fallback-throw" | ||
type="checkbox" | ||
checked={shouldFallbackThrow} | ||
onChange={(e) => setShouldFallbackThrow(e.target.checked)} | ||
/> | ||
</label> | ||
<ShouldFallbackThrowContext.Provider value={shouldFallbackThrow}> | ||
<ErrorBoundary>{children}</ErrorBoundary> | ||
</ShouldFallbackThrowContext.Provider> | ||
</> | ||
) | ||
} | ||
|
||
export function Fallback({ children }) { | ||
if (use(ShouldFallbackThrowContext)) { | ||
throw new Error('Unexpected fallback') | ||
} | ||
return children | ||
} | ||
|
||
class ErrorBoundary extends Component<{ children: React.ReactNode }> { | ||
state = { error: null } | ||
static getDerivedStateFromError(error) { | ||
return { error } | ||
} | ||
render() { | ||
if (this.state.error) { | ||
return <div id="error">{this.state.error.message}</div> | ||
} | ||
return this.props.children | ||
} | ||
} |
Oops, something went wrong.