The lint rule is triggered at the <form action={createInvoice}>...</form> part of the example above.
Functions can only be passed as props to Client Components. Add the "use client" directive at the top of the file to use it.eslint(react-server-components/use-client)
Using server action, we can pass functions as props in server components.
The example below is taken from the Next.js server action post.
The lint rule is triggered at the
<form action={createInvoice}>...</form>
part of the example above.Functions can only be passed as props to Client Components. Add the "use client" directive at the top of the file to use it.eslint(react-server-components/use-client)
package version