Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove instructions about actions in useSubmission(s) reference #1023

Merged
merged 17 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c8e6330
Remove instructions about actions in useSubmission(s) reference
amirhhashemi Jan 15, 2025
8ebb780
Update src/routes/solid-router/reference/data-apis/use-submission.mdx
amirhhashemi Jan 15, 2025
d182f0c
Update src/routes/solid-router/reference/data-apis/use-submissions.mdx
amirhhashemi Jan 15, 2025
2dec62f
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 17, 2025
fff40b3
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 18, 2025
8eaf158
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 25, 2025
dfa8591
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 27, 2025
fde3f5e
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 28, 2025
c7f7e30
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 28, 2025
6b5dec5
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 28, 2025
8177347
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 28, 2025
11b7192
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 28, 2025
4720ae9
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 28, 2025
bd1780b
Merge branch 'main' into update-use-submissions
kodiakhq[bot] Jan 29, 2025
21a8647
Update src/routes/solid-router/reference/data-apis/use-submissions.mdx
LadyBluenotes Jan 29, 2025
ba34732
Update src/routes/solid-router/reference/data-apis/use-submissions.mdx
amirhhashemi Jan 29, 2025
0e2b0c9
Update src/routes/solid-router/reference/data-apis/use-submission.mdx
amirhhashemi Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand Up @@ -24,20 +24,11 @@ function Component() {
}
```

## Creating the action
<Callout type="info>
amirhhashemi marked this conversation as resolved.
Show resolved Hide resolved

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.
LadyBluenotes marked this conversation as resolved.
Show resolved Hide resolved

```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

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

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

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";
As a note, if building a SolidStart app, it's recommended to utilize the `"use server"` directive to take advantage of server-side caching and RPC capabilities.
amirhhashemi marked this conversation as resolved.
Show resolved Hide resolved

const postNameAction = action(() => {
"use server";
/*... logic ...*/
return { data: "Hello SolidStart" };
})

```
</Callout>

## Filtering Submissions

Expand Down Expand Up @@ -202,4 +195,4 @@ function Component() {
</form>
)
}
```
```
Loading