Skip to content

Server action: Example of bound arguments server action. #22

Description

@revskill10

Could we write and use server action like this ?

'use server'

const action = (boundArgs) => async (args) => {
   //...
}

From server component, we want to pass in boundArgs

function ServerComponent(): {
const boundargs = `blahblah`;
return <Component action={action(boundargs)} />
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions