app/components/example-server-component.js import { ExampleClientComponent } from './components/example-client-component.js'
 
function ExampleServerComponent({ id }) {
  async function updateItem(data) {
    'use server'
    modifyItem({ id, data })
  }
 
  return <ExampleClientComponent updateItem={updateItem} />
}
app/components/example-client-component.js 'use client'
 
function ExampleClientComponent({ updateItem }) {
  async function action(formData) {
    await updateItem(formData)
  }
 
  return (
    <form action={action}>
      <input type="text" name="name" />
      <button type="submit">Update Item</button>
    </form>
  )
}
On-demand Revalidation