-
Notifications
You must be signed in to change notification settings - Fork 289
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
base: main
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
❌ Deploy Preview for solid-docs failed. Why did it fail? →
|
aed6ad9
to
b21eae5
Compare
b21eae5
to
c8e6330
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know your thoughts on these changes!
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learn more about actions in the [`action`](/solid-router/reference/data-apis/action) docs. | |
To trigger a submission, [actions](https://docs.solidjs.com/) can be used. | |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To trigger a submission, actions can be used.
I think this is a little misleading. action()
doesn't trigger a submission on itself.
Submitting a <form>
or using useAction
triggers a submission.
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.
This is more closely related to actions rather than useSubmission
. It might be more suitable for the actions concept page or the action
reference page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'm not sure whether this kind of information is a good fit for a reference page according to diataxis:
It can be tempting to introduce instruction and explanation, simply because description can seem too inadequate to be useful, and because we do indeed need these other things. Instead, link to how-to guides, explanation and introductory tutorials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this information needs to be put somewhere. I want to avoid just removing stuff bc it doesn't fit in a page, but making sure that the content is put in a more appropriate place.
Do you mind showing what alternatives you feel fit better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created an issue that explains part of the problem: #1024
Regarding this line:
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.
I believe a tip callout in the Actions concept page would be the best place for this information.
src/routes/solid-router/reference/data-apis/use-submissions.mdx
Outdated
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. If in a [SolidStart](/solid-start) app 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learn more about actions in the [`action`](/solid-router/reference/data-apis/action) docs. | |
To trigger a submission, [actions](https://docs.solidjs.com/) can be used. | |
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. |
Co-authored-by: Sarah <[email protected]>
Co-authored-by: Sarah <[email protected]>
Description(required)
This PR removes the "Creating the action" section from
useSubmission(s)
reference page and replaces them with a callout to theaction
reference.Related issues & labels
useSubmission(s)
reference #1012