Hi
How to pass dateSession to the server action named createSessionAction in the following case :
CreateSessionForm.tsx
import { createSessionAction } from "@/lib/actions/sessions";
function CreateSessionForm({ params }: CreateSessionPageParams) {
const [dateSession, setDateSession] = React.useState<Date>();
return (
<form action={createSessionAction}>
sessions.tsx
export async function createSessionAction(formData: FormData) {
// How to get dateSession here?