Comments (6)
I have the same issue, server actions seem to return promises when they returned the promised object in the past? (my version is 14.1.4)
export async function createOrganization(name: string, description: string, logo: string) {
const info = getInfo();
used to work, but now I need to do:
export async function createOrganization(name: string, description: string, logo: string) {
const info = await getInfo();
from next.js.
I’ll take a look at the compilation issue!
@georgesmahl that is the expected behavior:
Because the underlying network calls are always asynchronous, 'use server' can only be used on async functions.
https://react.dev/reference/react/use-server
from next.js.
maybe it's related to #61001
from next.js.
this issue is still valid on [email protected]
from next.js.
Hey @shuding,
Can you check this? Is this behavior expected?
from next.js.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
from next.js.
Related Issues (20)
- Forms example does not work with useActionState
- Failed to reload dynamic routes: Error: Catch-all must be the last part of the URL.
- static-export get searchParams is empty HOT 1
- static-export get searchParams is empty
- generateMetadata example not working HOT 1
- Use of deprecated dependency that leaks memory in `eslint-config-next` (inflight 1.0.6)
- 'next/dynamic' - SSR does not seem to work for dynamically imported components. HOT 2
- Duplicate Requests in Next.js 14 on Server Side with Parallel Routes and Intercepting Routes
- `router.replace()` on pages with query params cause entire page re-render on Next 14.2.3 HOT 1
- Form state not updating and suspended components reloading on first server action submission when using revalidatePath with loading.tsx in app router HOT 1
- `router.replace()` on pages with query params cause entire page re-render on Next 14.2.3 HOT 1
- Suspense boundary broken (ignored) after second server action call HOT 8
- Nonce exposed to the DOM
- [Bug][Next.js13]: renderError does not follow the err info of __NEXT_DATA__ when hytrate in client
- Docs: Wrong link for UseFormState. HOT 3
- `no-store` cache in nextjs config doesn't disable disk caching.
- The `maxDuration` setting in the api route config, as per the documentation, isn't being honored on dev or on Vercel. We're on the pro plan. HOT 1
- TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner') when rendering model using react-three libraries HOT 1
- next/og don't work when turbo is enabled in dev HOT 1
- Metadata is not generated for intercepting routes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.