-
Notifications
You must be signed in to change notification settings - Fork 312
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
[Content]: Clarify useSubmission(s)
Documentation to Emphasize Actions Over Form Submissions
#1024
Comments
Hey @amirhhashemi, thanks for bringing this to our attention. I chatted with some people on the team and for the sake of avoiding being opinionated here, we all agree that removing the focus on forms is for the best. With that being said, you can remove the information in a PR for this since we will need to create a guide that addresses what we will be removing here (and elaborating on it all). |
@amirhhashemi I feel like you improved the reference docs, the only thing required is creating the guide (which there's another issue for). I'm going to close this for that reason |
@LadyBluenotes I haven't addressed this Issue yet. I have many issues with how data mutation primitives ( I haven't worked on it mainly because it's a lot of work. Perhaps it's better to create another issue to discuss these issues that I have and if I could convince you to move in that direction I can fix it in one PR. |
📚 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: