Skip to content

Server Action: Link to benefits from API ReferenceΒ #981

Open
@jsimonrichard

Description

@jsimonrichard

πŸ“š 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 actions 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 an action prop instead of onSubmit, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    plannedFeatures or content that are planned but not yet in progress.solid-routerRelated to Solid RoutersolidstartRelated to SolidStart

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions