---
title: Standard storefront events and actions
description: >-
  Your theme dispatches standard events and configures standard actions so apps
  can work with any storefront without theme-specific code.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/best-practices/standard-events-and-actions
  md: >-
    https://shopify.dev/docs/storefronts/themes/best-practices/standard-events-and-actions.md
api_name: liquid
---

# Standard storefront events and actions

An app that wants to know when a buyer adds an item to the cart used to read your theme's DOM or intercept `window.fetch`, which meant a separate integration for every theme. Standard storefront events and actions give every theme and every app the same interface instead.

Your theme dispatches an event when a buyer does something, such as viewing a product or updating the cart. Apps call an action when they need your theme to change something, such as opening the cart.

***

## What your theme does

Actions run on every Liquid storefront without you setting anything up, because every action ships with a default implementation. An app can call `updateCart` on your theme today with no work from you.

Those defaults have to work on any theme, so `updateCart` falls back to a page reload when it can't recognize your cart markup. A reload throws away scroll position and anything the buyer had typed.

You can [configure an action](https://shopify.dev/docs/api/storefront-events-and-actions/actions/configure) to update your own UI instead, and [dispatch events](https://shopify.dev/docs/api/storefront-events-and-actions/events/dispatch) from the places in your theme where buyers act.

***

## Reference

[Standard storefront events\
\
](https://shopify.dev/docs/api/storefront-events-and-actions/events)

[Look up the properties of every event and where to dispatch it from.](https://shopify.dev/docs/api/storefront-events-and-actions/events)

[Standard storefront actions\
\
](https://shopify.dev/docs/api/storefront-events-and-actions/actions)

[Look up the parameters and resolved value for every action.](https://shopify.dev/docs/api/storefront-events-and-actions/actions)

***
