[Content]: Clarify useSubmission(s)
Documentation to Emphasize Actions Over Form Submissions
#1024
Labels
in progress
Someone is currently working on the issue.
📚 Subject area/topic
Reference
📋 Page(s) affected (or suggested, for new content)
📋 Description of content that is out-of-date or incorrect
The problem
The
useSubmission(s)
documentation focuses a lot on form submissions, which I think is misleading. It introducesuseSubmission
mainly as a tool for handling form submissions. However, as I understand it, even when usinguseAction
to invoke an action, the submission details are still available throughuseSubmission(s)
. This meansuseSubmission(s)
is not just for forms.The documentation also says:
This makes it seem like
useSubmission(s)
depends on form submissions, but the need formethod="post"
is actually about how actions handle form submissions, not aboutuseSubmission(s)
itself.This becomes a problem when trying to remove the Creating the action section. In a related issue, I suggested removing it because it seemed unrelated. But when I tried to remove it in a pull request, I realized it was the only part that explained the link between submissions and actions. This forced us to awkwardly clarify that submissions are really about actions.
If users get halfway through the
useSubmission(s)
reference page without realizing it is mainly about actions, then the documentation is not clear enough.Proposed Solution
I suggest rewriting the
useSubmission(s)
reference page from the beginning through the end of "Creating the action" section.Instead of focusing on form submissions, the documentation should explain
useSubmission(s)
as a way to access an action's invocation/submission details/state. This way, we don’t need to say things like "To trigger a submission, actions can be used," because it will already be clear. Also, this would better describe whatuseSubmission(s)
actually does.🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered: