-
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
Server Action: Link to benefits from API Reference #981
Comments
Maybe we could link to https://docs.solidjs.com/solid-router/reference/data-apis/action from https://docs.solidjs.com/solid-router/concepts/actions. Would that help? |
Yes, that would help. But longer term, it might be nice to include something on the concepts page to discuss why Solid Router needs to handle mutations. Currently the concepts page says:
It wasn't clear to me what the "problem" was until I realized that the router handles caching. Otherwise, a server function or |
I see. yes, it's covered in benefits of actions But there isn't a clear connection the 2 entries. The "Learn" sections are to walk people through the benefits and treadoffs of different approach. This allow us to explain better API that are used together (for example, we need So, long-term, I think a clear connection between the routes and providing callouts where the Learn pages can compliment the Reference pages would be ideal. Suggested action items for this issue
|
action
not clear
Just left a comment in #914 about potentially restructuring the data loading section and possibly including mutations. |
📚 Subject area/topic
/solid-router/concepts/actions.mdx
📋 Page(s) affected (or suggested, for new content)
https://docs.solidjs.com/solid-router/concepts/actions
📋 Description of content that is out-of-date or incorrect
I'm not sure if this qualifies as incorrect, but it was confusing. I was trying to learn about why
action
s are useful---specifically, why they exist when we already have server functions---but based on this page alone it seems like there's no difference (other than being able to pass it to anaction
prop instead ofonSubmit
, and to a newbie like myself this doesn't seem that important).Only after reading https://docs.solidjs.com/solid-router/reference/data-apis/action and watching a video did I understand that
action
handles redirects (for single-flight mutations) and invalidating caches (either all caches by default or by passing cache keys).I don't know what the best change would be (or if there even needs to be one), but I thought I'd at least let you all know where there's friction.
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered: