Home / Function/ action() — ui Function Reference

action() — ui Function Reference

Architecture documentation for the action() function in notes.$noteId.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  07e05b2a_b6a3_1c4e_c826_f939cfa23c96["action()"]
  c50c71cf_2f76_a310_0a77_25e34e7779ce["notes.$noteId.tsx"]
  07e05b2a_b6a3_1c4e_c826_f939cfa23c96 -->|defined in| c50c71cf_2f76_a310_0a77_25e34e7779ce
  style 07e05b2a_b6a3_1c4e_c826_f939cfa23c96 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/test/fixtures/frameworks/remix-indie-stack/app/routes/notes.$noteId.tsx lines 25–32

export const action = async ({ params, request }: ActionFunctionArgs) => {
  const userId = await requireUserId(request);
  invariant(params.noteId, "noteId not found");

  await deleteNote({ id: params.noteId, userId });

  return redirect("/notes");
};

Subdomains

Frequently Asked Questions

What does action() do?
action() is a function in the ui codebase, defined in packages/shadcn/test/fixtures/frameworks/remix-indie-stack/app/routes/notes.$noteId.tsx.
Where is action() defined?
action() is defined in packages/shadcn/test/fixtures/frameworks/remix-indie-stack/app/routes/notes.$noteId.tsx at line 25.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free