Skip to content

Cart doesn't revalidate data on Server Action with client-side routing #22

@jackblatch

Description

@jackblatch

The add-to-cart Server Action should revalidate the /cart to refetch data from the database (e.g. showing the new items added to the cart) without a full page load (just using the Link component). The revalidatePath function seems to work with mutations on the same page, however, doesn't seem to cause a revalidation on other pages (in this case the cart page).

Current temporary work around - using <a> tags for linking to cart page in header and toast notifications, but this is far from ideal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions