-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixes #74843 --------- Co-authored-by: Gabriel Pulido <[email protected]> Co-authored-by: Hendrik Liebau <[email protected]>
- Loading branch information
1 parent
fe7c60b
commit 4a3ff85
Showing
8 changed files
with
85 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { default } from '../node/page' | ||
|
||
export const runtime = 'edge' |
28 changes: 28 additions & 0 deletions
28
test/e2e/app-dir/actions/app/decode-req-body/node/form.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,28 @@ | ||
'use client' | ||
|
||
import { useActionState } from 'react' | ||
|
||
export function Form({ | ||
echoAction, | ||
}: { | ||
echoAction: (value: string) => Promise<string> | ||
}) { | ||
let [result, formAction] = useActionState( | ||
() => echoAction(new Array(100000).fill('あ').join('')), | ||
null | ||
) | ||
|
||
let aCount = result ? result.match(/あ/g)!.length : 0 | ||
|
||
return ( | ||
<form action={formAction}> | ||
{result && ( | ||
<p> | ||
Server responded with {aCount} あ characters and{' '} | ||
{result.length - aCount} � characters. | ||
</p> | ||
)} | ||
<button>Submit</button> | ||
</form> | ||
) | ||
} |
13 changes: 13 additions & 0 deletions
13
test/e2e/app-dir/actions/app/decode-req-body/node/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,13 @@ | ||
import { Form } from './form' | ||
|
||
export default function Page() { | ||
return ( | ||
<Form | ||
echoAction={async (value) => { | ||
'use server' | ||
|
||
return value | ||
}} | ||
/> | ||
) | ||
} |
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
7 changes: 7 additions & 0 deletions
7
test/e2e/app-dir/use-cache-metadata-route-handler/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,7 @@ | ||
export default function Root({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html> | ||
<body>{children}</body> | ||
</html> | ||
) | ||
} |
3 changes: 3 additions & 0 deletions
3
test/e2e/app-dir/use-cache-metadata-route-handler/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,3 @@ | ||
export default function Page() { | ||
return <p>hello world</p> | ||
} |