Skip to content

Remove the unused cart query from the /cart route loader #171

Description

@hta218

Description

The /cart route loader fetches the cart on every visit, but nothing renders it.

app/routes/cart/cart-page.tsx:151-157 returns cart: await cart.get(), while the component at app/routes/cart/cart-page.tsx:161 only destructures featuredProducts from useLoaderData. The cart it renders comes from useCart() (the zustand store), and no other route reads this loader's cart field.

That is one wasted Storefront API round trip per /cart navigation, blocking the loader response.

Found while reviewing Weaverse/aspen#43, which ports this cart architecture and inherits the same dead loader call.

Suggested fix

Drop cart from the loader return, or use it to seed the store instead of re-fetching client-side.

Activity

  1. self-assigned this
    on Sep 3, 2026
  2. added theissue type on Sep 3, 2026
  3. transferred this issue fromWeaverse/weaverseon Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

  • Status
    Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions