diff --git a/src/routes/solid-router/reference/data-apis/use-submission.mdx b/src/routes/solid-router/reference/data-apis/use-submission.mdx index 82a9fb5d34..55c046dd2b 100644 --- a/src/routes/solid-router/reference/data-apis/use-submission.mdx +++ b/src/routes/solid-router/reference/data-apis/use-submission.mdx @@ -24,20 +24,11 @@ function Component() { } ``` -## Creating the action + -The Action which will trigger the submission should be created with the [`action()`](/solid-router/reference/data-apis/action) helper and, when in a [SolidStart](/solid-start) app, it is recommended to leverage the `"use server"` directive to leverage the caching and RPC capabilities from the server-side. +Learn more about actions in the [`action`](/solid-router/reference/data-apis/action) docs. -```tsx title="/component.tsx" {1,3-4} -import { action } from "@solidjs/router"; - -const postNameAction = action(() => { - "use server"; - /*... logic ...*/ - return { data: "Hello SolidStart" }; -}) - -``` + ## Filtering Submissions diff --git a/src/routes/solid-router/reference/data-apis/use-submissions.mdx b/src/routes/solid-router/reference/data-apis/use-submissions.mdx index e68c2741c4..817a95703f 100644 --- a/src/routes/solid-router/reference/data-apis/use-submissions.mdx +++ b/src/routes/solid-router/reference/data-apis/use-submissions.mdx @@ -42,20 +42,12 @@ function Component() { } ``` -## Creating the action + -The Action which will trigger the submission should be created with the [`action()`](/solid-router/reference/data-apis/action) helper and, when in a [SolidStart](/solid-start) app. If in a [SolidStart](/solid-start) app to leverage the caching and RPC capabilities from the server-side. +To trigger a submission, [actions](https://docs.solidjs.com/) can be used. -```tsx title="/component.tsx" {1,3-4} -import { action } from "@solidjs/router"; -const postNameAction = action(() => { - "use server"; - /*... logic ...*/ - return { data: "Hello SolidStart" }; -}) - -``` + ## Filtering Submissions @@ -202,4 +194,4 @@ function Component() { ) } -``` \ No newline at end of file +```