I am trying to work with next js Server Action in my Next-Express-Ts project. I followed the official docs implement it. but it seems to be not working. And it returns 404 in the console.
//actions.ts
import { redirect } from "next/navigation";
export async function myAction () {
redirect('/test');
}
//component
'use client'
import { myAction } from './actions'
export default function ClientComponent() {
return (
<form action={myAction}>
<button type="submit">Go...</button>
</form>
)
}