Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove instructions about actions in useSubmission(s) reference
Browse files Browse the repository at this point in the history
amirhhashemi committed Jan 15, 2025
1 parent 4e1d35a commit aed6ad9
Showing 2 changed files with 7 additions and 25 deletions.
15 changes: 3 additions & 12 deletions src/routes/solid-router/reference/data-apis/use-submission.mdx
Original file line number Diff line number Diff line change
@@ -24,20 +24,11 @@ function Component() {
}
```

## Creating the action
<Callout type="info" title="Note">

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.
To learn more about actions, see the docs for [`action`](/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" };
})

```
</Callout>

## Filtering Submissions

17 changes: 4 additions & 13 deletions src/routes/solid-router/reference/data-apis/use-submissions.mdx
Original file line number Diff line number Diff line change
@@ -42,20 +42,11 @@ function Component() {
}
```

## Creating the action
<Callout type="info" title="Note">

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 learn more about actions, see the docs for [`action`](/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" };
})

```
</Callout>

## Filtering Submissions

@@ -202,4 +193,4 @@ function Component() {
</form>
)
}
```
```

0 comments on commit aed6ad9

Please sign in to comment.