Support `.bind` syntax with Action functions (#49422)
This PR implements initial support for `.bind` syntax for inline actions
(not top-level `"use server"` files yet). For example:
```js
export default function Page({ foo, x, y }) {
async function action(a, b, c, d) {
'use server'
console.log(a, b, c, d)
}
return <ClientComp action={action.bind(null, foo[0], foo[1], foo.x, foo[y])} />
}
```
Is now valid.
Fixes NEXT-1109.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment