From b21eae512b1ca372f8e67c8e074f13cedaa42059 Mon Sep 17 00:00:00 2001 From: amirhhashemi <87268103+amirhhashemi@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:19:25 +0330 Subject: [PATCH] Remove instructions about actions in useSubmission(s) reference --- .../reference/data-apis/use-submission.mdx | 15 +++------------ .../reference/data-apis/use-submissions.mdx | 17 ++++------------- 2 files changed, 7 insertions(+), 25 deletions(-) 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 82a9fb5d3..dec2662a8 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. +You can [learn more about actions here](/solid-router/reference/data-apis/action). -```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 e68c2741c..b0ffbe73e 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,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. If in a [SolidStart](/solid-start) app to leverage the caching and RPC capabilities from the server-side. +You can [learn more about actions here](/solid-router/reference/data-apis/action). -```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 +193,4 @@ function Component() { ) } -``` \ No newline at end of file +```