mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
The issues with the current export statement validation for app router pages are documented in the added fixtures, see also the inline comments in the diff.
22 lines
312 B
JavaScript
22 lines
312 B
JavaScript
function createCachedFn(start) {
|
|
function fn() {
|
|
return start + Math.random()
|
|
}
|
|
|
|
return async () => {
|
|
'use cache'
|
|
return fn()
|
|
}
|
|
}
|
|
|
|
function createServerAction(start) {
|
|
function fn() {
|
|
return start + Math.random()
|
|
}
|
|
|
|
return async () => {
|
|
'use server'
|
|
console.log(fn())
|
|
}
|
|
}
|