Skip to content

Commit aed6ad9

Browse files
committed
Remove instructions about actions in useSubmission(s) reference
1 parent 4e1d35a commit aed6ad9

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

src/routes/solid-router/reference/data-apis/use-submission.mdx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,11 @@ function Component() {
2424
}
2525
```
2626

27-
## Creating the action
27+
<Callout type="info" title="Note">
2828

29-
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.
29+
To learn more about actions, see the docs for [`action`](/solid-router/reference/data-apis/action).
3030

31-
```tsx title="/component.tsx" {1,3-4}
32-
import { action } from "@solidjs/router";
33-
34-
const postNameAction = action(() => {
35-
"use server";
36-
/*... logic ...*/
37-
return { data: "Hello SolidStart" };
38-
})
39-
40-
```
31+
</Callout>
4132

4233
## Filtering Submissions
4334

src/routes/solid-router/reference/data-apis/use-submissions.mdx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,11 @@ function Component() {
4242
}
4343
```
4444

45-
## Creating the action
45+
<Callout type="info" title="Note">
4646

47-
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.
47+
To learn more about actions, see the docs for [`action`](/solid-router/reference/data-apis/action).
4848

49-
```tsx title="/component.tsx" {1,3-4}
50-
import { action } from "@solidjs/router";
51-
52-
const postNameAction = action(() => {
53-
"use server";
54-
/*... logic ...*/
55-
return { data: "Hello SolidStart" };
56-
})
57-
58-
```
49+
</Callout>
5950

6051
## Filtering Submissions
6152

@@ -202,4 +193,4 @@ function Component() {
202193
</form>
203194
)
204195
}
205-
```
196+
```

0 commit comments

Comments
 (0)